Windows Azure Websites is overriding my 404 and 500 error pages in my node.js app

Deadly 提交于 2019-11-27 12:03:59

Well nevermind, I found the issue. If anyone else is having the same problem simply add the following under <system.webServer> in web.config:

<httpErrors existingResponse="PassThrough" />

Had a similar problem with MVC project hosted in windows azure. On local machine hosted under IIS was working fine but on live machine I was getting the following error "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."

Adding this to web config under system.webServer saved my day

My web.config looks like this

<system.web>
   ***
    <customErrors mode="RemoteOnly" defaultRedirect="~/Error/PageNotFound">
      <error statusCode="404" redirect="~/Error/PageNotFound" />
      <error statusCode="500" redirect="~/Error/ServerError"/>
    </customErrors>
  </system.web>
***
<system.webServer>
    <httpErrors existingResponse="PassThrough" />
</system.webServer>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!