We help IT Professionals succeed at work.

"500 - Internal Server error."

IndwesAdmin
IndwesAdmin asked
on
I am running an IIS website on a 2012 R2 server that serves all static pages.  The first request to the server returns a "500 - Internal Server error.  There is a problem with the resource you are looking for, and it cannot be displayed."  Refreshing the browser and all future requests return pages as expected.  This also happens if it has been a while since the last page request.  (20 to 30 minutes)  I suspect a timer of some kind but cannot find it anywhere.  Is  this a known issue?  (Hopefully with a known solution.)
Comment
Watch Question

Professional Troublemaker^h^h^h^h^hshooter
Commented:
If you look in the Windows Event Viewer, for the Applications log... do you see events which indicate that the application pool has been stopped due to inactivity?
If that does track with the problem... I'd be suspicious that the pages aren't really static, that there is some active content.

Author

Commented:
Thank you.  I will double check the actual pages.

Author

Commented:
No.  Any pages that would have dynamic content are built by a separate application and deposited into the website as static pages.  Also, the default page is an index.html page and has nothing but static content.  (Just "double-double checked" and confirmed that this is the case.)  The initial directory being checked for pages is configured as a virtual directory rather than an application.  I am thinking that the virtual directory does not rely on the application pool?
Rich WeisslerProfessional Troublemaker^h^h^h^h^hshooter

Commented:
Do you have any handler mappings set on the website?
Any messages appearing in the System or Application Event Log?  (Especially the Application Event Log.)

Author

Commented:
I don't believe I have any handlers set for that website but I will check to confirm that and update my posting.

Author

Commented:
I stand corrected there are 3 handlers for the website that are inherited form the IIS parent settings.  They are OPTIONSVerbHandler, TRACEVerbHandler, and static file.  They are all set to the defaults for the IIS implementation in general.  I am not sure why any of them would reject only the first requested and then grant following requests.  I am still suspecting a timeout of some sort but can't identify it.

Author

Commented:
Checking the event log was productive in analyzing the problem.