Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/backbone.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net mvc MVC3错误处理-无法处理AZURE中的500个类型错误_Asp.net Mvc_Asp.net Mvc 3_Azure - Fatal编程技术网

Asp.net mvc MVC3错误处理-无法处理AZURE中的500个类型错误

Asp.net mvc MVC3错误处理-无法处理AZURE中的500个类型错误,asp.net-mvc,asp.net-mvc-3,azure,Asp.net Mvc,Asp.net Mvc 3,Azure,有没有人能用IIS7 web服务器在Azure中处理MVC3错误的有效解决方案。请注意,它必须是这种组合。我看到了很多答案,但对于Azure web角色的用户来说,答案并不多。我一定看了50多个网页,除了一个参考文献之外,什么也没找到 <configuration> <system.webServer> <httpErrors existingResponse="PassThrough"/> </system.webServe

有没有人能用IIS7 web服务器在Azure中处理MVC3错误的有效解决方案。请注意,它必须是这种组合。我看到了很多答案,但对于Azure web角色的用户来说,答案并不多。我一定看了50多个网页,除了一个参考文献之外,什么也没找到

<configuration>  
  <system.webServer>  
    <httpErrors existingResponse="PassThrough"/>  
  </system.webServer>  
<configuration> 
似乎它转到了正确的错误控制器和视图,但随后页面被更改,我得到了标准IIS输出(或者是MVC输出)。无论哪种方式,我想看到的是我的NotFound页面的内容,这是我可以在customerror设置为“On”时在本地看到的内容

这是我得到的,但不是我想要的:

The current error page you are seeing can be replaced by a custom error 
page by modifying the "defaultRedirect" attribute of the application's 
<customErrors> etc ...
您看到的当前错误页面可以被自定义错误替换
通过修改应用程序的
等

这是非常奇怪的,因为它显然只是试图把我带到重定向页面。我希望有人能帮忙。有人知道上面的页面片段是由什么生成的吗?它是IIS还是MVC的一部分?我在这上面花了最后一天的时间,结果一无所获。

您正在重定向未找到的http 404文件

但您的错误是http 500内部错误

因此,您的自定义错误配置不会捕获该错误


您需要捕获状态代码500。

您读过吗?另外,这实际上与Windows Azure有关吗?(在Windows Azure中的行为与在Windows Azure之外的行为不同吗?)问题是我正在获取?通过修改应用程序配置标记的“defaultRedirect”属性以指向自定义错误页URL,可以将您看到的当前错误页替换为自定义错误页。“我希望得到的是我未找到页面的内容。然而,在远程运行时,这似乎得到了替换。我以为Azure只支持MVC2?你是如何在Azure中运行MVC3应用程序的?
90b37.cloudapp.net/Error/NotFound?aspxerrorpath=/
The current error page you are seeing can be replaced by a custom error 
page by modifying the "defaultRedirect" attribute of the application's 
<customErrors> etc ...