IIS 7 500 Error Handling situation - iis

I am on IIS 7 with a Classic ASP application using Server.GetLastError() and i added this script that writes the error details to a database as a custom '500.100' error in IIS to execute this URL. So far it's been working on most situations when there is an error in the application. However, I am noticing in the IIS log that many people are getting ASP_0147 | Internal Server Error with a 500 error and no further explanation.
I am trying to catch this error showing up in the IIS Log using the method explained above, however, these errors are not being caught (written to database) using the application i made, whereas other types of errors are being caught, but the only errors that are being caught using the script/database i made, already show up with the entire error details in the IIS log.
So the question is, how can i catch the errors still happening in the IIS Log in the database using custom errors? because the method i'm using obviously isn't catching all the errors that show in the IIS Log, only the ones with an explanation being displayed in the log. Or, if I change the Error 'Feature Settings' to 'Detailed Errors' (because now its set on, Detailed only for Local Requests) will it show up in the IIS log, etc? Why am i only seeing 500 error in the IIS Log on certain things, but not on others? Thanks.

This could be an application stall.
If the server gets a lot of requests on the same time, causing the server to "get busy", it stalls some of the requests and possibly denying them. This could give a false-positive 500 error with the error-description (0x0).

Related

error 500 http web server: command not handled exception

I think this topic a lot of ppl post it already. I also look for lot of thread in stack overflow and some ibm page. They do give some comment of how to solve this problem. But i still facing the same problem, it still give this error.
Case start :
Actually one of my customer, they have facing this error during running on webpages and also notes ~
error 500 http web server: command not handled exception
Action taken but not solve:
The user id signing/creating the XPages allowed to run XPages in the
server document?
Do project clean, build automatically on designer
Do testing on creating new xpages page with simple lable " hello world" , this one can run successfully only.
Try to reload the http server by
tell http quit
load http
After do this the problem still same give the same error. May i know got any other way to solve it?
"Unresolved compilation errors: java.lang.String" points to a failed install as here. A class in java.lang or java.util should always be resolved. Ensure all services and any processes for Notes / Domino are stopped before the relevant install, jar files can get locked once used. Xpages can't load, Error 500; java.util cannot be resolved
Switch on "Display XPage runtime error page" in application's XSP Properties then you'll see a detailed error message which probably will lead you to the issue:
I frequently get this error when there is a mismatch/problem with access rights or the user login has expired and the app/database doesn't redirect to the login page. I suggest you double check the security basics first. (Might also explain why the app works locally, but not on the server).

WebApi application on Azure returning 500 errors for some endpoints

I am setting up an ASP.NET WebApi application running on the Azure web application environment. Most of my controllers and endpoints work fine, but there are about 10 routes that return 500 errors "An error has occured". It's not random. It's the same routes every time and I can find no pattern (not all the HTTP methods, from different controllers where other routes in that same controller work fine, and so forth)
When these errors occur, no error logging gets triggered as far as I can tell in the app. (I am using Raygun.IO if that matters). I tried adding a global.asax file with following lines in the Application_Error function:
Exception ex = Server.GetLastError();
new RaygunClient().SendInBackground(null, ex);
but as far as I can see, it doesn't get triggered when these 500 errors occur. The only thing I have found in the Azure server logs is the following warning in the Failed Requests log:
However, I don't see any errors in the trace previous to that point. I'm also not finding any other errors in any of my Azure logs that I can relate to these failing routes.
It's .NET 4.6 (tried 4.5.1 and 4.5.2 with no difference) WebApi using an OWIN startup class. Also tried updating all my packages to no effect.
Check to be sure you don't have routes that conflict. When a URI matches two or more controller actions, and thus Web API can't pick one, you will get a 500 error.
If you have a consistent repro, then you can use remote debugging to attach to your web app and debug it (https://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-troubleshoot-visual-studio/). If you can repro it through the browser, you can also turn the custom errors page off so that it shows the stack trace through the browser (<customErrors mode="off"/> under <server.web>).
Also, you can enable better diagnostic logs using the web app settings. Information on how to do so is here: https://azure.microsoft.com/en-us/documentation/articles/web-sites-configure/ under the section "Enabling diagnostic logs".
Also, as Brent said, URL conflicts can cause some nasty errors which aren't immediately obvious.
I figured out what was going on. There were actual errors occurring (mostly SQL related), but the way that we had configured the functions and error logging in those functions, the actual errors were being swallowed up and lost, overriding the error logging behavior of Raygun. I went through and ripped out the Try/Catch blocks we were using for error trapping and logging and the real errors finally emerged into the Raygun dashboard.

IIS 6 is throwing a "500 - Internal Server Error" for some users but not others

I had written a mini App in asp classic this week. It worked perfectly on the test server connecting to the test data base. Then yesterday evening I moved it from the test server to the live server updating the connection strings to the live db.
I published it as an application to the default website in the default app pool. Then I tested it and it worked perfectly.
This morning however both myself and another user receive a 500 -internal Server error when we try and save changes to the database(there appears to be no issue reading from the db) yet my two other collogues have no issue at all.
Even more odd is that the same thing is happening on the test server where the code hasn't been changed in weeks. But this morning I cannot commit to the db from there either.
I have attempt to enable more detailed error tracking and logging but the property options for the server are seem unavailable when i tried to set up custom Active Server Pages (ASP) error pages off online tutorials.
The server is used by a lot of people so I was wondering is their a permission issue depending on the user that restricts writting to the database. Or something else that may have changed to allow some users to write data and others to receive the error.
Im very knew to IIS so it may be something glaringly obvious that I haven't considered.
Thanks
This article should help you:
In earlier versions of IIS, error messages from classic ASP scripts
were sent to a Web browser, by default. Because these error messages
might reveal sensitive information to malicious users, IIS 7 and above
disables this feature by default. When your classic ASP scripts
encounter an error in IIS, you receive the following error message by
default:
An error occurred on the server when processing the URL. Please contact the system administrator.
If you are the system administrator please click here to find out more about this error.

Sharepoint 2010 sends error 404 once per user after deployment or application pool restart

We have a big SharePoint-Project we installed on different servers. Whenever we deploy any feature/webpart the first access of ANY page (including Backend Pages like "ManageFeatures.aspx") throws a 404 Error.
This happens once for every user
I included a httphandler (IHttpModule) to catch those errors to get more information. In that handler I found out that while this error is thrown SPContext.Current is null.
When I call that page a second time the 404 is gone and the page is shown correctly. This is not a sporadic error but happens every time we deploy something.
Any clue what causes this behavior and how to avoid this?
(We got the error on all of our 10 machines)
Try to represent this error with default master-page.

Track IIS Internal Error

I use JavaScript to post an Asynchronous Request to a Web Service. This works about 95% of the time. Sometimes, the request fails to be processed.
Below is the error message in the Trace file of IIS:
2009-02-24 06:14:40 W3SVC861612620
10.248.24.20 POST /TestWebService /TestWebService.asmx - 3112 -
10.250.201.45 Mozilla/4.0+ (compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+1.1.4322.2032)
500 0 0 1148 954 124876
This shows that the internal Error 500 has occurred to the request. Is there any way that I can get to know this in the JavaScript where i have posted the request from? Any workarounds are also fine.
Since you don't provide information about your javascript library, this will be hard to troubleshoot. However, if you're running on IIS 7, you can enable Failed Request Tracing.
Troubleshooting the old school way: your web method is generating an error 5% of the time, meaning it works in certain cases but fails in others. This is likely caused by the parameters sent to your web method. Even if you're unable to trap any runtime requests to your webmethod, you can inspect your logic to see what parameter conditions would cause a failure. Better yet, build a battery of unit tests to call your web method, passing every possible combination of parameters that is feasible.

Resources