Server Side ViewState
Server Side ViewState: I will have a closer look at this later
A .Net Developer's Dumpster
Server Side ViewState: I will have a closer look at this later
Posted by Jingye at 2:36 PM 0 comments
Labels: asp.net
Documenting Exceptional Developers seemed gives some pragamatic arguements on use try-catch wisely.
If Matt insists to make 'user login failure' kind of things as exceptions, I will show him this article and call him 'exceptional coder' ;-)
Also from Peter Bromberg, Build a Really Useful ASP.NET Exception Engine is more interesting to try out.
Posted by Jingye at 5:50 PM 0 comments
Labels: .net
Aspx Page have two event methods: [Page]_Error and OnError. They are different. OnError hands control to a private HandleError method. HandleError checks whether web.config:customErrors is turned on and redirects request accordingly.
The base implementation on OnError: checks whether tracing is turned on and adds its own bit about the exception just raised. The main reason to override OnError is to replace this behavior with your own implementation. There is no good reason to put other code there. If <customErrors> turned on, code in OnError will fire first then redirect request to customized error page. In this case code in Page_Error will not fire, as OnError fires first.
To do error-handling at the Page level, use Page_Error.
Experiment
Create an aspx page ManMadeError with both event handling methods:
Posted by Jingye at 5:22 PM 0 comments
Labels: asp.net
We can specify error pages to intercept HTTP errors using Web.config file.
To display a specific error handling page for HTTP status code such like 404(NotFound), 500(InternalServerError), 401(Unauthorized)etc we can add the following element to the web app’s web.config file:
Posted by Jingye at 12:27 PM 0 comments
Labels: asp.net
Remoting is useful for crossing app domains, but not for crossing machine boundaries. Check
this
Posted by Jingye at 11:28 AM 0 comments
Labels: service component
Issue: Form Based authentication, authenticated state cannot be kept between pages navigation in a web application.
The sample web app has been tested on a w2k svr which is a domain member and worked fine.
Moving to a stand alone w2k- my home PC, it failed. Trace file indicates the credentials has been authenticated (FormsAuthentication.Authenticate). On page redirection (FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, false);), the authenticated state lost.
Having run the IIS authentication diagnostic tool (http://www.iisfaq.net/), I found it point to the fact the IIS Web Server needs to be a domain member.
Posted by Jingye at 11:38 PM 0 comments
Labels: asp.net