Rob*_*ior 5 asp.net web-config visual-studio-2010 asp.net-mvc-3
将MVC3 Asp.net应用程序部署到客户端站点后,我们遇到了问题.
在客户端站点中,已在IIS7中创建了我们需要部署的虚拟目录.
问题出在web.config中,我们在其中指定了自定义错误页面
<!-- Custom Error Pages -->
<httpErrors errorMode="Custom" existingResponse="Replace">
<remove statusCode="404" subStatusCode="-1" />
<remove statusCode="500" subStatusCode="-1" />
<remove statusCode="403" subStatusCode="-1" />
<error statusCode="404" path="/Error/Http404" responseMode="ExecuteURL" />
<error statusCode="403" path="/Error/Http403" responseMode="ExecuteURL" />
<error statusCode="500" path="/Error/ServerError" responseMode="ExecuteURL" />
</httpErrors>
Run Code Online (Sandbox Code Playgroud)
错误页面路径无法正常工作.经过调查,我们发现必须指定虚拟目录并设置路径/virtual_directory/Error/Http404
有没有办法可以指定相对于虚拟目录的路径?
归档时间: |
|
查看次数: |
1725 次 |
最近记录: |