English 中文(简体)
ASP. 网上部分忽略我的习惯错误部分。
原标题:ASP.Net partially ignoring my Custom error section in web.config

这里是我的网络。 组合习俗 傲慢部分(青年通知一)将模式转而采用,因此,我可以看到我的当地东道方向:

    <customErrors defaultRedirect="~/Application/ServerError.aspx" mode="On" redirectMode="ResponseRewrite">
        <error statusCode="403" redirect="~/Secure/AccessDenied.aspx" />
    </customErrors>

这里还有:

        Catch adEx As AccessDeniedException

              Throw New HttpException(DirectCast(HttpStatusCode.Forbidden, Integer), adEx.Message)

        End Try

我最后谈到:

这不是我 pre的“接触”。 就像px页,但这是一个被禁止的错误页,因此至少我知道我的扔 throw正在发挥作用。

我把国际空间法研究所的403个入境点(7个)移走,这是一次令人绝望的最后尝试,也是毫无结果的。

我现在不谈任何建议,将不胜感激!

问题回答

In fact, your aspx page may not be executing at all.
Go to IIS. Go to your default website properties. Click on the Home Directory Tab Click the configuration button. Now, check if a .aspx page is registered there.

请具体说明该系统中的<代码>现有Response=“PassThrough”。 网站 http://Errors的服务器部分。

<configuration>
   <system.webServer>
       <httpErrors existingResponse="PassThrough" />
   </system.webServer>
</configuration>




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签