Azure WAF Issue with WebSocket (OmniFaces ) - azure

I have a OmniFaces WebSocket deployed on tomcat. The WebSocket works fine on tomcat.
One of our client infrastructure setup is Azure WAF --> IIS --> Tomcat.
We have successfully tested the WebSocket from IIS to Tomcat.
When we test from Azure WAF , we have a successful handshake (Upgrade request) , but the browser does not receive any of the push message. Microsoft claims the WebSocket are default supported in Azure WAF and no setup changes are required.
It looks more like a Azure WAF issue and I am not sure how to debug the issue.
Any suggestion or idea to debug this issue ?

Related

Azure: After Uploading SSL CERTIFICATE through Application Gateway Listeners on azure ,URL is not hitting

After creating Application Gateway Listeners and rules we have uploaded the SSL certificate(HTTPS) for Port:-443, but URL is not hitting.
we are using application gateway WAF , App services, we have configured Listeners, Http setting and rules but still URL is not hitting.
The same configuration is working perfectly on test environment. As the same we have configured on stage environment but this is not working.
Please suggest any setting we missed.
Server id not hitting
As per the error screen shot its TCP_Error meaning its not hitting to SSL layer. Please make sure with the same backend you're able to connect over HTTP listener.
What is outcome of probe. Please make sure to refer probe result
Also I would suggest you to check "diagnose and Solve Problem" of Application gateway.

React application deployed on azure is not using Http2 even though Http2.0 is enabled for app service on azure

I have deployed my react application on Azure App Service with .NET Stack (.NET Core 3.1,2.1). I have enabled Http2.0 from Azure App Service > Configuration > General Settings and also from azure resource explorer. At both places it shows Http2.0 but browser still uses Http1.1. TLS Settings are Https only and TLS version 1.2
There is no problem with this function.
I reproduced your problem. You only need to open a new privacy mode window and refresh it a few times to see the new settings take effect.
This problem may be caused by browser cache, etc.
Test Result.
In front of the APP service WAF was enabled. And WAF was not supporting Http2.0

Connecting Application to Azure SignalR Service

I'm trying to connect my application to Azure SignalR Service. The application works fine using SignalR locally or even using Azure App Services.
services.AddSignalR();
The code above is what I had and everything works.
services.AddSignalR().AddAzureSignalR(Configuration.GetValue<string>("SignalRConnectionString"));
This is the change to be able to use Azure SignalR Service.
In the logs, I can see that the request is being forwarded to the Azure End Point.
I keep getting this error.
failed: HTTP Authentication failed; no valid credentials available

How does an azure app service access a no azure web server

I have an Azure app service and in some cases I need to send a web request to a non-azure webserver. What do I need to do to make it possible.
Currently the web request fails with no clear error message.
In response to a HttpClient Put request I get a System.Net.WebException exception which says there were errors.
THe same request works from a desktop application.
If your webserver is reachable from the internet you should be able to access it through your App Service. Try to log a ping to your webserver and google (8.8.8.8).
If your App Service is in a VNET you should enable some outbound rules to your webservers IP adress.
The server I am connecting to is an other Azure service. After some more investigating, It appears that I can connect to it if I do not use SSL (i.e. http://) but the connection is immediately closed when using SSL (https://). I assume that the problem must be related to the use of SSL.

Signalr Issue on Azure Service Fabric: Error during WebSocket handshake

We are using Service Fabric for hosting our messaging service ASP.NET Core web API (leveraging signalr) and React web application as a client. Everything works exactly as expected on local machines but not on Azure. We have configured CORS policies for cross-origin handling since the service and the web app are hosted on different servers. Configured sticky sessions in load balancer. This CORS Policy works in local machine with the service and client hosted on different ports.
Post hosting the application on Azure, I get an Error in the browser console as
Error during WebSocket handshake: Unexpected response code: 500
The issue is very likely to be happening because of CORS.
Looking the screenshot you provided, it is possible to see the CORS exception and, as you are aware, the front-end application calling the SignalR service are hosted on different locations(The domain is the same but different ports).
The CORS settings you applied probably didn't work.
You have two solutions:
Configure CORS in the ASP.NET CORE, so SignalR can accept the call from other domains.
Host both on same domain + port to avoid CORS

Resources