Dealing with MVC Publish Errors

Sometimes an error will occur after publishing that does not occur in localhost. This can be difficult to troubleshoot since the generic error screen is displayed rather than a detailed error report. One way to address this is to alter the web.config file to display the error details and then re-publish.

The changes are:

Under <system.web> add the following:

<customErrors mode="Off"/>

Under <system.webserver> add the following:

<httpErrors errorMode="Detailed" />

This can help identify the problem areas so that further troubleshooting can be performed. Remember to removed these changes and re-publish once the error has been identifyed and corrected.

0 COMMENTS

Please Log in or Register to leave a comment