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

5
  • check your supported MVC version on your hosted IIS. Commented Sep 16, 2016 at 6:17
  • 4
    Have you set customErrors to Off to see the actual error? Commented Sep 16, 2016 at 7:36
  • @ramiramilu now this is showing "System.PlatformNotSupportedException: This operation requires IIS integrated pipeline mode." this error. Commented Sep 16, 2016 at 8:40
  • 1
    @KhaledMdTuhidulHossain You need to change App Pool from classic to integrated mode - stackoverflow.com/questions/22313167/… Commented Sep 16, 2016 at 8:42
  • @ramiramilu okey , trying and letting you know. And thanks :D Commented Sep 16, 2016 at 13:09

1 Answer 1

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>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.