如何检查c#,asp.net中的错误代码 [英] how to check error code in c#, asp.net
本文介绍了如何检查c#,asp.net中的错误代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
如何查看错误,我在网络应用程序中收到的内容。
喜欢:403,404,405,500 ....
因此,基于此代码,我可以重定向到特定页面。
plzzzz建议我。
谢谢
Hi guys,
How do i check the error, what i get in my web application.,
like: 403,404,405,500....
so that, based on this code i can redirect to the particular page.
plzzzz suggest me.
thanks
推荐答案
我会带一个退一步看看究竟需要实现什么,如果编写C#代码真的是最好的方法。
IIS和ASP.Net有内置模块为此,这称为 httperrors [ ^ ]
看看这个链接,它可能会也给你一个指示。
http://www.stokia.com/support/misc/web -config-custom-httperrors.aspx [ ^ ]
I will take a step back and look exactly what needs to be achieved and if writing C# code is really the best way to do this.
IIS and ASP.Net have built-in module for this and that is called httperrors[^]
Look at this link and it might give you an indication as well.
http://www.stokia.com/support/misc/web-config-custom-httperrors.aspx[^]
这篇关于如何检查c#,asp.net中的错误代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文