After normally Web application process is being released, mix to give an user a friendly interface use experience, can jump when mistake happening the wrong page that turns to one each definition, is not ASP.net exposes the detailed unusual list that come out to the user.
Simple wrong processing page can be installed through Web.config
| It is quotative content below: > of < CustomErrors Mode= “RemoteOnly” DefaultRedirect= “GenericErrorPage.htm” > of < Error StatusCode= “403″ Redirect= “NoAccess.htm” / > of < Error StatusCode= “404″ Redirect= “FileNotFound.htm” / < / CustomErrors > |
If think the kind that carries process designing will present wrong reason, can do this thing through Page_Error incident.
Another kind of means can come true through Global.asax, I feel this kind of way is relatively convenient, if can written guarantee,close an alone more friendly page additionally, look case better off a few:
If Global.asax(needs, can record wrong daily record)
| It is quotative content below:
Void Application_Error(object Sender, eventArgs E) Protected Void Page_Load(object Sender, eventArgs E) |
When final user uses applied program, they may not want to know wrong reason, this moment, we can be passed answer choose casing to come true, whether to present wrong reason. Can put Label in a Div, use next answer choose casing to decide to whether present Div
| It is quotative content below:
> of < Script Language= “JavaScript” Type= “text/Javascript” / /- - > |
We are OK to Errorpage this page does a few kinder designs, let a person look better off some.
