500 Error
-
This is going to be really generic, but... ASP.Net website hitting a sql server database. Our web site hits a database and according to the sql server profiler, the stored proc is returning the requested data, but the response that we're seeing is a 500 error. What might cause that?
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
This is going to be really generic, but... ASP.Net website hitting a sql server database. Our web site hits a database and according to the sql server profiler, the stored proc is returning the requested data, but the response that we're seeing is a 500 error. What might cause that?
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013Any kind of unhandled exception in the code that follows on from calling the stored procedure. Check the event log on the server - hopefully at least some details of the error should be logged there.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
Any kind of unhandled exception in the code that follows on from calling the stored procedure. Check the event log on the server - hopefully at least some details of the error should be logged there.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
We have five db/web server combinations running the same code. This is the only one that exhibits the problem. We found out that it was a 500 error by checking the logs. That's the first thing we checked to see if it was happening on the other servers. We've been trying to resolve this for a week... non-stop...
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
We have five db/web server combinations running the same code. This is the only one that exhibits the problem. We found out that it was a 500 error by checking the logs. That's the first thing we checked to see if it was happening on the other servers. We've been trying to resolve this for a week... non-stop...
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013Assuming this isn't ASP.NET Core, the Windows application event log on the affected server should contain an entry for every unhandled exception thrown by your application. Eg:
Log Name: Application
Source: ASP.NET 4.0.30319.0
Date: 05/02/2021 08:33:24
Event ID: 1309
Task Category: Web Event
Level: Warning
Keywords: Classic
User: N/A
Computer: ...
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 05/02/2021 08:33:24
Event time (UTC): 05/02/2021 08:33:24
Event ID: 3517ee43b6ef4766b78e33194f895134
Event sequence: 19833
Event occurrence: 3
Event detail code: 0Application information:
Application domain: /LM/W3SVC/2/ROOT-1-132569484930082141
Trust level: Full
Application Virtual Path: /
Application Path: ...
Machine name: ...Process information:
Process ID: 4920
Process name: w3wp.exe
Account name: IIS APPPOOL\.NET v4.5 (64-bit)Exception information:
Exception type: InvalidOperationException
Exception message: Request format is unrecognized for URL unexpectedly ending in '/CountProducts'.
at System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response)
at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)
at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)Request information:
Request URL: ...
Request path: ...
User host address: ...
User:
Is authenticated: False
Authentication Type:
Thread account name: IIS APPPOOL\.NET v4.5 (64-bit)Thread information:
Thread ID: 89
Thread account name: IIS APPPOOL\.NET v4.5 (64-bit)
Is impersonating: False
Stack trace: at System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response)
at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpCon -
Assuming this isn't ASP.NET Core, the Windows application event log on the affected server should contain an entry for every unhandled exception thrown by your application. Eg:
Log Name: Application
Source: ASP.NET 4.0.30319.0
Date: 05/02/2021 08:33:24
Event ID: 1309
Task Category: Web Event
Level: Warning
Keywords: Classic
User: N/A
Computer: ...
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 05/02/2021 08:33:24
Event time (UTC): 05/02/2021 08:33:24
Event ID: 3517ee43b6ef4766b78e33194f895134
Event sequence: 19833
Event occurrence: 3
Event detail code: 0Application information:
Application domain: /LM/W3SVC/2/ROOT-1-132569484930082141
Trust level: Full
Application Virtual Path: /
Application Path: ...
Machine name: ...Process information:
Process ID: 4920
Process name: w3wp.exe
Account name: IIS APPPOOL\.NET v4.5 (64-bit)Exception information:
Exception type: InvalidOperationException
Exception message: Request format is unrecognized for URL unexpectedly ending in '/CountProducts'.
at System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response)
at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)
at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)Request information:
Request URL: ...
Request path: ...
User host address: ...
User:
Is authenticated: False
Authentication Type:
Thread account name: IIS APPPOOL\.NET v4.5 (64-bit)Thread information:
Thread ID: 89
Thread account name: IIS APPPOOL\.NET v4.5 (64-bit)
Is impersonating: False
Stack trace: at System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response)
at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpConWe figured out what it was - database permissions. F*ckin DBA's...
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013