Search code examples
c#asp.net-mvciispublishhttp-status-code-500

500 - Internal server error after publish on server


After publishing my asp mvc app to plesk hosting I have 500 error. When I run it locally all works fine.

  1. I checked my connection string. This connection string is correct and uses for another apps that hosts on that server.

  2. Tried to turn on debug and view detailed error message. add such code to my web.config and turn off custom errors on server with turn on debug mode also on server (Plesk)

nothing helps.... (code with configs bellow)

  1. Checked all permissions for files on server.
<system.web>
  <customErrors mode="Off"/>
</system.web>
<system.webServer>
    <httpErrors errorMode="Detailed" />
    <asp scriptErrorSentToBrowser="true" />
</system.webServer>
routes.MapRoute(
                "Test",
                "{controller}/{action}/{GUID}/{questionNumber}",
                new { controller = "Test", action = "Index", GUID = "", questionNumber = "" }  // Parameter defaults
            );

How to resolve it? :(


Solution

  • So, the problem was in controller name. Just was renamed TestController to ExamController