We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

Website giving 500 internal server errorRSS

11 replies

Last post May 19, 2021 08:47 AM by samwu

  • Website giving 500 internal server error

    Apr 21, 2021 10:50 AM|ronnyrunatserver|LINK

    Hi Team,

    The webapi deployed on window server 2019 having IIS 10 gives 500 internal server error the first time after deployment. But as we restart the IIS it goes away..

    Any clue, why it's happening

  • Re: Website giving 500 internal server error

    Apr 22, 2021 01:33 AM|samwu|LINK

    Hi Anmol,

    ronnyrunatserver

    The webapi deployed on window server 2019 having IIS 10 gives 500 internal server error the first time after deployment. But as we restart the IIS it goes away..

    I think this may be caused by the cache, because after restart, the error disappeared.

    Best regards,

    Sam

    IIS.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
  • Re: Website giving 500 internal server error

    Apr 22, 2021 06:50 AM|ronnyrunatserver|LINK

    Hi samwu, 

    Thanks for the response. If it is due to cache so is there any other way of removing cache rather than restarting the IIS manually? I want this to be handled without user involvement. So that the user using the application doesn't face this. 

    Or is there any other scenario via which we can get the exact cause of this issue?

  • Re: Website giving 500 internal server error

    Apr 22, 2021 09:34 AM|samwu|LINK

    Hi Anmol,

    ronnyrunatserver

    Thanks for the response. If it is due to cache so is there any other way of removing cache rather than restarting the IIS manually? I want this to be handled without user involvement. So that the user using the application doesn't face this. 

    Or is there any other scenario via which we can get the exact cause of this issue?

    Can you reproduce this problem? If you can, please post a detailed error about 500 internal server error.

    If you can’t, it’s hard to find the problem.

    Best regards,

    Sam

    IIS.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
  • Re: Website giving 500 internal server error

    Apr 23, 2021 08:42 AM|ronnyrunatserver|LINK

    Till Now we have identified two things w.r.t. 500 issue for the deployed web API

    We have caught two error the time we faced 500 issue :-

    first one in iis failed request tracing

    1. <failedRequest url="https://TestURL/GetDataFromDB"
                     siteId="1"
                     appPoolId="DefaultAppPool"
                     processId="12504"
                     verb="GET"
                     remoteUserName=""
                     userName=""
                     tokenUserName="NT AUTHORITY\IUSR"
                     authenticationType="anonymous"
                     activityId="{80000C25-0002-C500-B63F-84710C7967BB}"
                     failureReason="STATUS_CODE"
                     statusCode="500"
                     triggerStatusCode="500"
                     timeTaken="31"
                     xmlns:freb="http://schemas.microsoft.com/win/2006/06/iis/freb"
                     >
    2. The second one in sql server log file viewer             
      2. Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. Reason: Could not find a login matching the name provided. [CLIENT: MyIPAddress]

      I hope this info can provide some fruitful information samwu
  • Re: Website giving 500 internal server error

    Apr 23, 2021 09:23 AM|samwu|LINK

    Hi Anmol,

    ronnyrunatserver

    first one in iis failed request tracing

    When you use failed request tracking, you will get an xml file, open it and you will see errors and warnings directly.

    ronnyrunatserver

    Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. Reason: Could not find a login matching the name provided. [CLIENT: MyIPAddress]

    Please make sure you have selected "SQL Server Authentication" mode for user you created from Server > Security > Logins option.

    Best regards,

    Sam

    IIS.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
  • Re: Website giving 500 internal server error

    Apr 23, 2021 10:48 AM|ronnyrunatserver|LINK

    The first is already the one pasted from the XML generated in failed request tracing of IIS.. Rest is there anything that we can do with regards to the first IIS one.

    The second one I will check

    Further I got this while searching other forums

    https://www.c-sharpcorner.com/UploadFile/specialhost/how-to-fix-login-failed-for-user-nt-authority-iusrs-in-share/#:~:text=%22IUSR%22%20is%20used%20when%20user,IUSR%22%20to%20the%20database%20permissions.

    Here I am more concerned with this statement in second paragraph

    To resolve this problem, either change the application pool identity or add "NT AUTHORITY\IUSR" to the database permissions

  • Re: Website giving 500 internal server error

    Apr 26, 2021 08:51 AM|samwu|LINK

    Hi Anmol,

    ronnyrunatserver

    To resolve this problem, either change the application pool identity or add "NT AUTHORITY\IUSR" to the database permissions

    Has your problem been solved by this method?

    Best regards,

    Sam

    IIS.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
  • Re: Website giving 500 internal server error

    May 14, 2021 10:39 AM|ronnyrunatserver|LINK

    Hi, 

    I noticed one more case, in which 500 internal error came on a client 1 machine, but on other client machines the same website was working fine. We investigated and set the iis_usrs permission for  the website directory on server. By this it started working on that specific client machine.

    IF we remove the iis_usrs permission, it again stops for client 1 machine but works for other.

    So solution is there but why the issue is happening on single client machine only for rest working fine

  • Re: Website giving 500 internal server error

    May 18, 2021 03:03 AM|samwu|LINK

    Hi Anmol,

    ronnyrunatserver

    I noticed one more case, in which 500 internal error came on a client 1 machine, but on other client machines the same website was working fine. We investigated and set the iis_usrs permission for  the website directory on server. By this it started working on that specific client machine.

    IF we remove the iis_usrs permission, it again stops for client 1 machine but works for other.

    So solution is there but why the issue is happening on single client machine only for rest working fine

    Have you considered that it is caused by caching? Restart your iis and try again. Is it the same situation?

    Best regards,

    Sam

    IIS.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
  • Re: Website giving 500 internal server error

    May 18, 2021 01:27 PM|ronnyrunatserver|LINK

    Yes, its the same. Further the case 1 is still not clear that why the below issue is coming in iis logs 

    1. <failedRequest url="https://TestURL/GetDataFromDB"
                     siteId="1"
                     appPoolId="DefaultAppPool"
                     processId="12504"
                     verb="GET"
                     remoteUserName=""
                     userName=""
                     tokenUserName="NT AUTHORITY\IUSR"
                     authenticationType="anonymous"
                     activityId="{80000C25-0002-C500-B63F-84710C7967BB}"
                     failureReason="STATUS_CODE"
                     statusCode="500"
                     triggerStatusCode="500"
                     timeTaken="31"
                     xmlns:freb="http://schemas.microsoft.com/win/2006/06/iis/freb"
                     >

    Is this also somehow related to permissions or what, any idea?

    Do microsoft provide paid support for production issue such as the one we are facing? If yes, please share link for the same.

  • Re: Website giving 500 internal server error

    May 19, 2021 08:47 AM|samwu|LINK

    Hi Anmol,

    ronnyrunatserver

    Is this also somehow related to permissions or what, any idea?

    After you use failed request tracking, open the xml file, there will be a detailed information for the error.

    ronnyrunatserver

    Do microsoft provide paid support for production issue such as the one we are facing? If yes, please share link for the same.

    https://support.microsoft.com

    Best regards,

    Sam

    IIS.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >