The logon Page code is as follows:
Private void disablepagecaching () <br/>{< br/> response. expires = 0; <br/> response. cache. setnostore (); <br/> response. appendheader ("Pragma", "No-Cache"); <br/>}</P> <p> protected void page_load (Object sender, eventargs E) <br/>{< br/> disablepagecaching (); <br/> If (this. request. cookies [globalparameters. cookie_key_logonuserflag]! = NULL & this. request. cookies [globalparameters. cookie_key_logonuserflag]. value. tostring () = "1") <br/>{< br/> If (httpcontext. current. user. identity. isauthenticated) <br/>{< br/> response. cookies [globalparameters. cookie_key_logonuserflag]. value = "0"; <br/> response. redirect ("~ /Default. aspx ", true); <br/>}</P> <p> protected void btnlogon_click (Object sender, eventargs E) <br/> {<br/> response. cookies [globalparameters. cookie_key_logonuserflag]. value = "1"; <br/> session [globalparameters. session_key_logonuser] = NULL; <br/> response. statuscode = 401; <br/> response. statusdescription = "unauthorized"; <br/> response. addheader ("www-authenticate", "negotiate"); <br/> response. addheader ("www-authenticate", "NTLM"); <br/>}
If you use Visual Studio development server instead of creating a virtual directory in IIS, an error occurs.
Version Information:ASP. NET development server 9.0.0.0
In addition, when a breakpoint is set during debugging, after the domain user input box is displayed and the user and password are entered, page load is not triggered for the dead and dead, which is the above error.
The solution is to create a virtual directory.
Server Error in '/'application.
HTTP Error 403-forbidden.