1

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.

enter image description here

SurvivalMachine
  • 7,946
  • 15
  • 57
  • 87

1 Answers1

2

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>
Ammar Alyasry
  • 106
  • 1
  • 6