Search code examples
asp.net-mvciiswindows-server-2016

500 - Internal server error with no details


Client gave me a server with public ip. I could see default IIS page in browser locally. Then I did following steps

  1. I published solution (Asp.Net MVC) on my file system.
  2. Copied published folder on server.
  3. Created new website in IIS.
  4. Stopped default web site as it was using port 80.
  5. Assigned port 80 to newly created website.
  6. Opened ip again in browser but it gave me 500 - Internal Server Error.

I made sure following configuration is there in web.config file

<configuration>
    <system.webServer>
        <httpErrors errorMode="Detailed" />
        <asp scriptErrorSentToBrowser="true"/>
    </system.webServer>
    <system.web>
        <customErrors mode="Off"/>
        <compilation debug="true"/>
    </system.web>
</configuration>

also added following line in config

<validation validateIntegratedModeConfiguration="false" />

still it showed no details for error even on the server.

I connected same publish folder to my local IIS and it is working fine.

Did I miss anything?


Solution

  • The reason for 500 error can be complicated.

    So we have to check several things first.

    1.Please ensure IIS asp.net feature has been installed on the client server's side. You can check these configurations by reviewing modules and handler mapping in IIS manager.

    2.Please check whether the application works fine when you publish to Client's local folder.

    3.Please ensure IUSR, authenticated user and application pool identity has been added to the security group of your folder.

    4.Please Check whether special sub-status code or win-32 status code can be found in your IIS log.

    5.Please ensure your .net framework and your clients' are the same.

    6.Please check whether your application pool has selected the correct mode and runtime version.

    With more information, we may find out the root cause of the 500 error.