Problem to receieve HTTPS trafic in Azure Application Gateway

Mohsen Akhavan 936 Reputation points
2022-04-08T14:28:17.257+00:00

I have

In my scenario, I have an Application Gateway And three web apps on the backend.
I route traffic based on subdomain and config Listener with HTTPS. All of the home pages of these web apps work well.
Also, I have a program that sends data to a specific URL on web app 2 from a VM.
When I send traffic directly to the web app2 address via HTTP and HTTPS, it works well. Because they connect together with private IP and they are on the same network.
Example URL:

https://webapp2.ase.p.azurewebsites.net/Hub  

http://webapp2.ase.p.azurewebsites.net/Hub  

In my application gateway I config the listener with HTTPS but when I want to send traffic to https://app2.mydomain.com/Hub ( Application Gateway) via HTTPS I receive an error.
The error is:

`Microsoft.AspNetCore.SignalR.HubException: Unable to complete handshake with the server due to an error: Handshake was canceled.`  

But, when I change the application listener configuration to HTTP and send traffic to http://app2.mydomain.com/Hub, it works well.
For your information, inbound and outbound traffic on 80 and 443 ports on the Security groups and VM firewall are open.

`Netstat` output in public IP:  

191414-image.png

Netstat output in private IP:
191326-image.png

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
964 questions
Azure Web Application Firewall
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,954 questions
0 comments No comments
{count} votes

Accepted answer
  1. Takahito Iwasa 4,841 Reputation points MVP
    2022-04-09T21:50:03.057+00:00

    Hi, @Mohsen Akhavan

    From the error message You are using SignalR, right?

    First, check the precautions when using WebSocket with Application Gateway.
    https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-websocket

    • HTTP / HTTPS listeners
    • Proper configuration of packed-end pools and routing rules
    • Checking the normality probe for each HTTP / HTTPS
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful