-1

I have two ASP.NET websites hosted on a server and connecting to the SQL database on on different server.

One of the website throwing 500 internal server errors (as custom error mode on in production). I am not sure what is causing these errors. And these errors are random, so I am not able replicate on dev environment. Both website having almost similar functionality but I am facing these errors only in one website. Recently there so many time out errors. So I asked the system admins to check the event log then they said lot of windows updates are pending, so they ran patch and rebooted both application and database servers.

After that I am getting 500 internal errors while going from login to default page in the website but I am sure there nothing wrong with code and these errors not caught in the application_error event in the global ascx file.

Any insights on how to troubleshoot this issue further?

pnuts
  • 58,317
  • 11
  • 87
  • 139
Rams
  • 39
  • 1
  • 6
  • this is a very broad question because the issue can be anything from iis to sql or maybe your code, the user credentials. try to narrow down the issue identifying what's behind the generic 'error 500'. – Paolo Jul 31 '15 at 13:28
  • 2
    Can you turn custom error mode OFF to get a more detailed error? – Dylan Jul 31 '15 at 13:29
  • Take a look at failed request tracing. – DavidG Jul 31 '15 at 13:31
  • Run the site from the server and turn on "send error message to browser" in IIS. This will at least allow to see the stack trace and the error message. Make sure to turn that off again in IIS though. – Sean Lange Jul 31 '15 at 13:43
  • It could also be caused by an error in the web.config file. You could pare down the application and web.config to eliminate pieces until you find the culprit. – Duston Jul 31 '15 at 14:50
  • I don’t see anything in the event logs on server. I do see where some SSL connections failed because a TLS 1.2 connection request was received from a remote client application, but none of the cipher suites supported by the client application are supported by the server. The SSL connection request failed. This what happens according to admin.one of the sites uses SSL authentication.I am not sure is it related to 500 error.this error losts for about 1 or 2 min i am not able to check the specific error on server in browser. – Rams Aug 10 '15 at 16:00

1 Answers1

0

Error 500 is very generic error. AFAIK when it happens an application pool of the application is 'killed'. It can be caused for instance by infinite recurrence (stack overflow).

To be honest it's impossible to tell you why this error occurs on your environment, but my advice for you is following: configure some logging system, there's a chance that it will log what causes an error before application pool will 'die'.

I strongly recommend ELMAH. It's a great tool and very easy to configure. If it won't help you should implement writing log messages in some important places of your application so you can target what module/class/method causes problem.

Here you can find a bunch of information about ELMAH:

https://www.stormconsultancy.co.uk/blog/development/tools-plugins/getting-started-with-elmah-asp-net-error-logging-and-reporting/

http://www.asp.net/web-forms/overview/older-versions-getting-started/deploying-web-site-projects/logging-error-details-with-elmah-cs

https://dillieodigital.wordpress.com/2011/03/30/elmah-a-quick-start-tutorial-and-guide/

Arkadiusz Kałkus
  • 17,101
  • 19
  • 69
  • 108