Disclaimer

Any opinions expressed here are my own and not necessarily those of my employer (I'm self-employed).

Mar 6, 2012

IIS 500 errors leave clues in the log

Yesterday I was playing around with the validateIntegratedModeConfiguration="true" setting on IIS 7.5. To my surprise I got an empty response back, with no indication of what went wrong.


Looking at the response with Fiddler yields:

HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Mon, 05 Mar 2012 15:59:52 GMT
Content-Length: 0

There's not much to work with here! I checked the event log, there was nothing there. So I started looking around for an error log of some sort (I used to play with Apache back in the days) turns out there's no such thing in IIS.

Some googling led me to an in-depth article: Troubleshoot IIS7 errors like a pro. I enabled detailed error messages for my website, still no luck.

Finally, I figured out that the easiest way to get an indication of what's going on is to check the IIS log. In the default setup, IIS keeps the logs for each website in: C:\inetpub\logs\LogFiles. Here's a log entry from my logfile (shortened for readability):



2012-03-05 15:59:52 ::1 GET /Somesite/ - 443 - ::1 Mozilla/5.0 500 22 50 1

Notice the "500 22" in the log? That's the 500 error, along with its substatus. The substatus is the key here, as you can look that up in Microsoft's document on The HTTP status codes in IIS 7.0 and in IIS 7.5. Voila, my error was actually:
500.22 - An ASP.NET httpModules configuration does not apply in Managed Pipeline mode.
I can work with that.

Of course, you could also enable failed request tracing in IIS if you're a pro, here's a walkthrough by the IIS team: Troubleshooting Failed Requests Using Tracing in IIS 7. I tried it, and it also revealed the substatus of the response. Still, checking the IIS log was a much faster way of getting an indication of what the problem was, and sometimes that's all you need. So check your logs first, then start troubleshooting like a pro!



25 comments:

  1. Just wanted to express my thanks for this article. It just saved my bacon! May you receive extra karma today!

    ReplyDelete
  2. I'm getting error 500 when a POST request is made to a web service hosted on IIS 7.5
    GET is fine. When an external company POST the data is when I notice a 500.0.0 Internal Server Error.

    MS say it's an error with the ISAPI module, but my initial GET request is parsed and throws the error only during the POST operation.

    Tried all the tricks - any suggestions ??

    cheers

    ReplyDelete
    Replies
    1. I've got the same issue, did you find a solution?

      Delete
  3. Good article!

    ReplyDelete
  4. Thank you, very helpful!

    ReplyDelete
  5. France will look to consolidate their position atop 2018 FIFA World Cup Group A on Saturday when they face Luxembourg at the Stade Josy Barthel in Luxembourg City.
    Italy vs netherlands Live
    Italy vs netherlands Live Stream
    Italy vs netherlands
    netherlands vs Italy Live
    netherlands vs Italy Live Stream
    netherlands vs Italy
    Italy vs netherlands Live
    Didier Deschamps' side are three points ahead of the pair, and with only one automatic qualification place up for grabs pe

    ReplyDelete
  6. The last time Portugal and Hungary met each other was in Lyon during the Euro 2016 and it was a goalfest with the game finishing 3-3 courtesy Cristiano Ronaldo’s assist and a brace
    Portugal vs Sweden Live
    Portugal vs Sweden Live Stream
    Portugal vs Sweden
    Portugal vs Sweden Live Free
    Sweden vs Portugal Live
    Sweden vs Portugal Live Stream
    Sweden vs Portugal
    Sweden vs Portugal Live Free
    On Saturday night, in World Cup qualifier, Ronaldo was once again pivotal in Portugal’s win but Hungary barely had a sniff with just one shot on target for them.

    ReplyDelete

  7. The COMNEBOL World Cup qualifying game between Bolivia and Argentina will be played at the Estadio Hernando Siles (La Paz) and kicks off at 22:00 CET on Tuesday 28 March 2017.
    Argentina vs Bolivia Live
    Argentina vs Bolivia Live Stream
    Argentina vs Bolivia
    Bolivia vs Argentina Live
    Bolivia vs Argentina Live Stream
    Bolivia vs Argentina
    Football Soccer - Bolivia team training - World Cup 2018 Qualifiers - La Paz, Bolivia - 24/3/17. Marcelo Martins (L) and goalkeeper Carlos Lampe during a training session. DAVID MERCADO (REUTERS)

    ReplyDelete
  8. Paraguay vs Ecuador Live Streaming, Lineups, Live Score – Watch 2017 World Cup qualifier Football online
    Ecuador vs Colombia Live
    Ecuador vs Colombia Live Stream
    Ecuador vs Colombia
    Colombia vs Ecuador
    Colombia vs Ecuador Live
    Colombia vs Ecuador Live Stream
    Paraguay vs Ecuador Live Streaming, Lineups, Live Score: The seventh-placed team is facing the third spotted Ecuador on this Thursday at Defensores del Chaco. It is the 13th game of South America qualifier of FIFA World Cup 2018

    ReplyDelete

  9. The Chilean National Team must leave behind the painful defeat against Argentina and try to harvest three points against Venezuela in the next date of the Qualifying.
    Chile vs Venezuela
    Chile vs Venezuela Live
    Chile vs Venezuela Live Stream
    Venezuela vs Chile
    Venezuela vs Chile Live
    Venezuela vs Chile Live Stream
    And is that those led by Juan Antonio Pizzi desperately need a victory that returns them to the qualifying zone for the 2018 World Cup.

    ReplyDelete
  10. Brazil vs Uruguay live stream, TV channel Watch World Cup qualifier online
    Coach Tite's team is far from that level, and current star Neymar is not Pele
    Brazil vs Paraguay Live
    Brazil vs Paraguay Live Stream
    Brazil vs Paraguay
    Paraguay vs Brazil Live
    Paraguay vs Brazil Live
    Paraguay vs Brazil Live Stream
    Brazil faces Uruguay in a World Cup qualifier today. Here is how you can live stream the match online with TV channel and time information.

    ReplyDelete

  11. Watch Visit us For Miami Open Tennis 2017 Live With Start Time – Miami Open Tennis 2017 Live Online HD TV Schedule The full order of play and schedule for day one at the 2017 Miami Open
    Miami Open Tennis 2017 Live
    Miami Open Tennis 2017 Live Stream
    Miami Open Tennis 2017
    Miami Open Tennis Live
    Miami Open Tennis Live Stream
    The first round of women’s matches starts on Tuesday 21 March with 12 main-draw women’s matches on the order of play, highlighted by former French Open runner-up Sara Errani taking on Belinda Bencic – two women at opposite ends of their careers who are both trying to overcome temporary struggle

    ReplyDelete
  12. UFC 210 London: Jimi Manuwa v Corey Anderson - Live stream online or watch on TV with BT Sport
    Subscribers can simply bookmark this page and use the UFC London live streaming banners below to ensure they do not miss a second of the action.
    UFC 210 Live Stream
    UFC 210 Live
    UFC 210
    Cormiervs Johnson 2 Live Stream
    In-depth preview, exclusive video and everything you need to know about how to live stream UFC Fight Night London

    ReplyDelete
  13. Our Green Bay Packers Banner Flag measures 28x40 inches, is constructed of 2-ply 100% polyester, and provides a top sleeve for hanging vertically from a wood flagpole. The Green Bay Packers Banner Flag is high quality dye sublimated with the NFL Packers logo as shown. NFL Banners Flags are a perfect way to show neighbors your NFL team allegiance by flying from your front porch, patio, or deck.Our NFL Banner Flags are 2-ply, double-sided, and viewable and readable correctly on both sides.These flags are made of a premium polyester and made in the USA.Fly your Green Bay Packers Banner Flag with our 5' wood flagpole and adjustable flag bracket.nfl house divided flags
    dallas cowboys american flagBills stars and stripes flags
    Dallas Cowboys house flags

    ReplyDelete
  14. http://aquarius-dir.com/index.php?p=d
    http://www.directory4.org/index.php?p=d
    http://www.411freedirectory.com/index.php?p=d
    http://blog.numbersbox.com/2014/11/public-transit-all-about-density.html
    http://www.philippineflightnetwork.com/2013/10/renovations-of-naia-terminal-1-expected.html
    http://moviemushcom.blogspot.com/2010/12/they-died-with-their-makeup-on.html
    http://www.dotnetnoob.com/2012/03/iis-500-errors-leave-clues-in-log.html

    ReplyDelete
  15. http://www.dotnetnoob.com/2012/03/iis-500-errors-leave-clues-in-log.html
    http://www.speakingcs.com/2014/08/method-references-in-java-8.html
    http://www.rationaljava.com/2015/02/maven-tip-all-about-executable-jars.html
    http://www.myjourneyto5thgrade.com/2013/03/math-workshop-task-cards-and-freebie.html
    http://www.cx-journey.com/2011/12/customer-experience-lifecycle.html
    http://www.directory10.biz/index.php?p=d
    http://www.justdirectory.org/index.php?p=d
    http://afunnydir.com/index.php?p=d
    http://www.austindiapers.org/p/drop-off-locations.html
    http://hotdirectory.net/index.php?p=d
    http://www.helperblogger.com/2014/12/snow-effect-for-blogger.html
    http://www.mysamplecode.com/2011/10/android-datepickerdialog.html
    http://www.prepavenue.com/2013/08/2-preps-dorm-room.html
    http://www.astronauts4hire.org/2011/02/press-release-beer-has-landed.html
    http://targetlink.biz/index.php?p=d
    http://www.healthteacher101.com/p/class-vodcasts.html

    ReplyDelete

Copyright notice

© André N. Klingsheim and www.dotnetnoob.com, 2009-2015. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to André N. Klingsheim and www.dotnetnoob.com with appropriate and specific direction to the original content.

Read other popular posts