Error " An error occurred while Processing your request. "

Asked

Viewed 6,760 times

4

I developed a MVC C# application for JSON reporting in my localhost it works normally, to query because it takes 2 to 3 databases depending on the report, but when I host the application in Azure, most of the time it gives an error

"an error occurred while Processing your request."

Sometimes he does it without a problem, I’m suspecting it’s some timeout you have configured in the Azure panel, but I did not find this option in the panel.

2 answers

11

The Azure network assumes that the application that is going up is production, so Debug messages are turned off by default. The way is to manually enable the property customErrors in the configuration of your project.

Configure your Web.config with the following:

<configuration>
  ...
  <system.web>
    ...
    <customErrors mode="Off" />
    ...
  </system.web>
  ...
</configuration>
  • You mean On instead of Off?

  • No, it’s really off. customErrors makes the . NET require the user to write a custom error screen.

  • And setting it to Off will show the detailed message or simply omit the error?

  • 2

    Shows the message, the Stack Trace, gives some links...

5


I deactivated the customError and the real error appeared, it happened that for an oversight of mine I did not close a connection, when I ran host site it worked, more because on the host site worked and on Azure not? good is because when you test on your machine you close the browser at the end of the test, thus closing the open connections, already in Zure on the other hand it does not open a browser, it makes the request and is there, as it had not closed the connection it simply left open thus exceeding the number of connections!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.