403 (Site Disabled) in SignalR hosted in Azure - azure

My App is hosted in Azure Websites and uses SignalR
Azure started a new thing where they shut down the website if it's been idle for more than a few seconds. i.e. no requests.
For some reason, having an active outgoing websockets connection does not seem to keep the website "active". So the WebSockets client starts getting 403 (Site Disabled) until you make another http request.
Has anyone else encountered this issue?
Does anyone have a solution?

Related

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.

azure error 502 - Web server received an invalid response while acting as a gateway or proxy server

I'm trying to host an azure website and tried troubleshooting for a few hours, but still keep getting the same error 502 Web server received an invalid response while acting as a gateway or proxy server.
I tried enabling logging errors on azure, but all it gives me are 404 not found errors
502 errors won't be visible in your IIS logs because they are returned by the front end server which basically fowards the requests to the worker hosting your site and there are many reasons why the front end can return 502 error.
Please follow https://azure.microsoft.com/en-in/documentation/articles/app-service-web-troubleshoot-http-502-http-503/ to troubleshoot the issue and see if you can identify which one you are running into
I had a setup with web servers behind a azure application gateway, some servers works properly and traffic to one of the server is having the 502 issue. So I take the following steps:
Check the Backend health on the application gateway, the server can't be reached.
Open the backend server url on a cloud VM http://hostname, the root website can't be reached. But the http://hostname/app is running.
It turns out the gateway will ping the port 80 of the target machine and somehow I disabled the root website on the target server. So the gateway assumes the server is dead and refused to do the redirect.
We were getting a 502 response with an Azure function. The Function App was started, and all of our functions inside here were marked as "good". But when we checked the azure function process explorer, there were no java proceses (this was written in java... pity me)
When checking the Azure function logs, it turned out that someone had deployed a dynatrace integration and this was crashing the function on startup.
So 502 basically means "I can see you are triggering me but when I try to pass that trigger back to the actual function app, I can't see anything"

Application gets very slow - Azure Web App

I have a Web site deployed on Azure Web App. My web site gets very slow at times. This behavior is random.
On checking IIS Logs during the period of slowness, I found few requests coming in where the Client IP Address is blank (It shows "-").
The response time of these requests runs into minutes and finally they result into HTTP 500 error. This happens only for the requests where c-ip is blank.
All other requests that have a Client-IP address are processed successfully. But because of the bad requests my application becomes very slow. I have to restart my Web App to resolve this issue.
What could be the possible reason behind these requests having a blank Client IP Address ? Could this be a malicious attack on the web site ?
Difficult to say. Could you add Application Insights service to your project? It allows you to see what is going on before and after 5 minutes of "this" request. The second reason can be the mode of your Azure Web App - is it free or shared or standard?
After AI added, you could share some more insights, because it is important to know what is that request about, not just the fact that it was processed.
https://azure.microsoft.com/en-us/documentation/articles/app-insights-start-monitoring-app-health-usage/

SignalR: WebSockets Error 400 on Azure Virtual Machine

I am hosting a WebSockets (SignalR) application on a Azure VM and I am experiencing the following 400 (Bad Request) error when connecting remotely.
WebSocket connection to 'ws://xxx.cloudapp.net/signalr/connect?transport=webSockets&
clientProtocol=1.5&connectionToken=JMLk3b...&connectionData=%5B%7B%22name%22%3A%22
dashboard%22%7D%5D&tid=10' failed: Error during WebSocket handshake:
Unexpected response code: 400
This does not happen when accessing the app locally within the VM.
My suspicion is that this is a proxy problem as highlighted in these various articles.
However, I can't seem to find any articles indicating whether one can actually host WebSockets apps on Azure VMs (I know they recently enabled WS on Azure Websites, but it seems as if the VMs don't have this feature yet).
Any help would be appreciated. Thanks!
The problem ended up being proxy servers (such as Squid) used client side at various ISPs and not proxy servers on the Azure side.

SharePoint and WCF for anonymous user in load balancing servers

I am having a WCF web service and i am uploading a document to SharePoint site through this service.In my staging server it works fine with a single server but in the production we are having four servers in Load balancing and it is giving me the error...
An error occurred while receiving the HTTP response to http://jai-dms-app.rajdiscoms.com:1111/_vti_bin/Discom/Service.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.
Please help me ..
The reason why you are having an issue is most likely due to the loop back check. You will need to update the registry to fix that
http://support.microsoft.com/kb/926642/en-us
You may also want to ensure your load balance has sticky sessions

Resources