ASP.NET????????
???????????? ???????[ 2014/4/22 10:33:50 ] ????????NET ??????
????ASP.NET?????????????????????????????????try??catch????????ó???????д????????????????????????????????????try??catch??ü??????????????????????????????????????????????????????t????????????????????????????????????Σ?????????NET???????ó????????????ASP.NET??ó????????????????????????????????????飬???????????????????????????ó????????????????????????????????????????????δ???????????CLR?????????????????????????ó???????漴?????
??????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????濼???
????ASP.NET???????????????????λ????漶????ó???????????????????????????????????Page?????Error?????????????????????д???????????????????????δ?????????????HttpApplication???????Error??????????????????ó??????????????
??????漶??????
protected override void OnError??EventArgs e??
{
Exception ex = Server.GetLastError????;
if??ex is NotImplementedException??
Server.Transfer??"errorpages/notImplemented.aspx"??;
else
Server.Transfer??"errorpages/apperror.aspx"??;
Server.ClearError????;
}
???????Server?????GetLastError???????????????????????????????????棬??????????????????????????????ClearError???????
????????????
????????Error??????????????????????????????????ó??????????湲????????????????????????ó???????????????????????????????δ??????????????????漶????????????????????????????????????ó????HttpApplication?????е?Error??????????????????global.asax????????????У???????Application_Error??????
protected override void OnError??EventArgs e??
{
Exception ex = Server.GetLastError????;
if??ex is NotImplementedException??
Server.Transfer??"errorpages/notImplemented.aspx"??;
else
Server.Transfer??"errorpages/apperror.aspx"??;
Server.ClearError????;
}
???????????????
??????δ???????????????????ASP.NET????????????????????????????ó???Web.Config????е?<customErrors>???Σ???????????????г???????
<configuration>
<system.web>
<customErrors mode="Off">
</customErrors>
</system.web>
</configuration>
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11