Server.Transfer throws Error executing child request. How to resolve?

后端 未结 8 1824
小蘑菇
小蘑菇 2020-12-17 08:36

I have a HttpModule in C# 2.0 which handles exceptions thrown. Whenever the exception is thrown, an error page (aspx) with some querystring will be called. It i

8条回答
  •  难免孤独
    2020-12-17 08:58

    My fix was different:

    An online query produced this Microsoft Knowledge Base article which stated the resolution would be to use Response.Redirect instead of Server.Transfer.

    I changed the command and got a more accurate "404 Error Message" instead of the cryptic "Error executing child request" message.

    That led me to inspect the redirect string and I noticed my path was off.

    I fixed the Transfer String from "ErrorPage.aspx" to "../ErrorPage.aspx" (notice the path change) and Server.Transfer worked just fine.

提交回复
热议问题