2
votes

I have simple azure service app that talks to azure storage tables . This works just fine when I run it through visual studio and gives the below error when I run it after deployment .

Server error 502 - Web server received an invalid response while acting as a gateway or proxy server. There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.

• This use to work just fine a few months before . • I have no Azure application gateway or proxy , I believe its mandatory to have one right ? • The problem is there in both http://myservice.azurewebsites.net/Add/Create and http://www.myservice.com/Add/Create • There is some data base interaction that happens before the problem page comes. I also see that that data interaction on the problem page also completes fine , as I can see from backend that the data has been added. • Using application insights , I see that all the said actions returned https error 200 , none have 502 .

I see from some web search , this is some front end error , what logs in azure will tell me the details ?

1
Have you tried to Enable diagnostics logging for your web app? Could you show the related code in your backend? Moreover, you could Remote debugging web apps, Troubleshoot HTTP 502 & 503 by yourself to narrow down this issue.Bruce Chen

1 Answers

1
votes

@BruceChen Thanks a lot , those are great links , Putting System.Diagnostics.Trace.TraceInformation("My Info") in my code , i was able to see in the real time trace logs ; that I had an exception in my code :( . Fixing the exception fixed the error .