locked
IIS10 not writing logs RRS feed

  • Question

  • User-523289171 posted

    I am trying to setup up a MVC6 on IIS10. 

    A 500 error gets thrown in the browser so I though I would have a look at the logs. There is nothing in the logs about the 500 error although logs are being written. Here is an example of a log that was written when the 500 error occurred.

    Date: 2016-01-20 20:32:59
    #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
    2016-01-20 20:32:59 ::1 GET /MyApartment - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/47.0.2526.111+Safari/537.36 - 500 0 0 17579

    Is there ANY documentation about hosting MVC6 on IIS10 ?

    Wednesday, January 20, 2016 3:57 PM

Answers

  • User-1122936508 posted

    All that the FailedRequestTrace logs tell me is that I have a 500 Error and that is was sent from the httpPlatformHandler

    It should also tell you what httpPlatformHandler was attempting to do when the 500 was set. For example, if it's in Execute_Request_Handler, then the request has already been handed off to your .NET handler, and something inside there is then raising an error. You need to debug the code there. That's just one example, and it would probably help if you are able to put the FREB log up somewhere (PasteBin etc.) so that someone can have a look at it.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Sunday, January 24, 2016 12:18 AM
  • User-823319154 posted

    Hi geeee,

    We can enable this Failed Request Tracing in the IIS by steps below,

    1.Open Internet Information Services (IIS) Manager:

    2.In the Connections pane, select the server connection, site, application, or directory for which you want to configure failed request tracing.

    3.In the Actions pane, click Failed Request Tracing...

    4.In the Edit Web Site Failed Request Tracing Settings dialog box, select the Enable check box to enable tracing, leave the default value or type a new directory where you want to store failed request log files in the Directory box, type the number of failed request trace files you want to store in the Maximum number of trace files box, and then click OK.

    You can check log files in C:\inetpub\logs\FailedReqLogFiles, it will give more details to troubleshoot this issue.

    Regards,

    Angie

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Thursday, January 28, 2016 1:29 AM

All replies

  • User-1122936508 posted

    Date: 2016-01-20 20:32:59
    #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
    2016-01-20 20:32:59 ::1 GET /MyApartment - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/47.0.2526.111+Safari/537.36 - 500 0 0 17579

    The bolded number is the HTTP status code - looks like it is being logged.

    You can use Failed Request Tracing to try to get an error message

    Wednesday, January 20, 2016 6:32 PM
  • User-523289171 posted

    Hi Ken 

    I setup Failed Request Tracing on the site and now I can see the tracing information. Thanks

    All that the FailedRequestTrace logs tell me is that I have a 500 Error and that is was sent from the httpPlatformHandler.  

    Saturday, January 23, 2016 8:03 AM
  • User-1122936508 posted

    All that the FailedRequestTrace logs tell me is that I have a 500 Error and that is was sent from the httpPlatformHandler

    It should also tell you what httpPlatformHandler was attempting to do when the 500 was set. For example, if it's in Execute_Request_Handler, then the request has already been handed off to your .NET handler, and something inside there is then raising an error. You need to debug the code there. That's just one example, and it would probably help if you are able to put the FREB log up somewhere (PasteBin etc.) so that someone can have a look at it.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Sunday, January 24, 2016 12:18 AM
  • User1896514328 posted

    Have you checked the Application Event logs for errors? Usually a 500 will have an accompanying entry with a stack trace, depending on where the error was thrown.

    Wednesday, January 27, 2016 10:44 AM
  • User-823319154 posted

    Hi geeee,

    We can enable this Failed Request Tracing in the IIS by steps below,

    1.Open Internet Information Services (IIS) Manager:

    2.In the Connections pane, select the server connection, site, application, or directory for which you want to configure failed request tracing.

    3.In the Actions pane, click Failed Request Tracing...

    4.In the Edit Web Site Failed Request Tracing Settings dialog box, select the Enable check box to enable tracing, leave the default value or type a new directory where you want to store failed request log files in the Directory box, type the number of failed request trace files you want to store in the Maximum number of trace files box, and then click OK.

    You can check log files in C:\inetpub\logs\FailedReqLogFiles, it will give more details to troubleshoot this issue.

    Regards,

    Angie

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Thursday, January 28, 2016 1:29 AM