Classic ASP & ASP.Net Authentication

允我心安 提交于 2019-12-07 14:26:36

问题


I have two separate apps (one is classic asp, the other is asp.net) which, from the point of view of the user, should appear seamlessly as one "application". As others have pointed out, the two apps can't share session information, so I am planning to use windows authentication along these lines:-

In the ASP world:

Request.ServerVariables("AUTH_USER")

and in ASP.Net (.Net 2.0):

System.Threading.Thread.CurrentPrincipal.Identity.Name

which is called from my business logic layer (i.e.

HttpContext.Current.User.Identity.Name

is not available to me).

Is this considered good practice or is there a better way? What do I need to consider when setting up IIS?


回答1:


I had to do this a couple of years ago and I remembered Scott Guthrie had a good post that got me started.

http://weblogs.asp.net/scottgu/archive/2007/03/04/tip-trick-integrating-asp-net-security-with-classic-asp-and-non-asp-net-urls.aspx

We ended up buying the book he talks about too. It's a good read.



来源:https://stackoverflow.com/questions/1492725/classic-asp-asp-net-authentication

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!