404 handling in Azure website

后端 未结 1 1339
再見小時候
再見小時候 2021-02-07 20:06

I have got an MVC website on Azure. I have written a controller action to stand in for a resource, that should return HTTP 404, but the body content should be some HTML where I

1条回答
  •  北荒
    北荒 (楼主)
    2021-02-07 20:13

    I was able to fix this by adding this httpErrors entry to the web.config:

      
        
          
        
    
    

    I found this answer here:

    http://blog.dezfowler.com/2010/09/aspnet-custom-error-not-shown-in-azure.html

    0 讨论(0)
提交回复
热议问题