I made a new MVC Project in Visual Studio 2015, then published that package and uploaded into my Windows hosting. After extraction when I browse my URL it shows me this error message. But my application runs on locally just fine.
The custom error pages are not enabled for local in your code,
you have to add mode="On"
. So customErrors
looks something like this:
<customErrors mode="On" defaultRedirect="Error" redirectMode="ResponseRewrite">
<error redirect="Error/NotFound" statusCode="404" />
</customErrors>