![](https://www.cnblogs.com/Emoticons/QQ/lol.gif)
FormsAuthentication.SetAuthCookie(txtName.Text,false);
HttpCookie lcookie = Context.Response.Cookies[FormsAuthentication.FormsCookieName];
lcookie.Domain = ".cnblogs.com";//
方法进行登录设置,使用this.Page.User.Identify.Name获取设置在Cookie里的数据,但是这一句在VS2005里读取不出,最可恶的是在我的测试环境里2.0的IIS已经设置了使用asp.net 2.0解释,还出现:
Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.
Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.
气死我了,后来发现,自己先
![](/Emoticons/hitwall.gif)
后来还是灵机一动,从.Net 1.1版本里连接到我开发的项目只有一个地方,还是可以使用自定义Cookie记录用户ID的方法解决,在测试环境中通过
![](https://www.cnblogs.com/Emoticons/QQ/14.gif)
其实在解决问题过程中也通过搜索的方法想去找到我要解决的问题,不过发现很多都是把以前的项目转到.Net 2.0里,基本没有.Net 1.1和.Net 2.0同时运行在IIS6上的个案,看来这回还是做了一次先行者。