【发布时间】:2011-01-20 00:16:15
【问题描述】:
我有 2 个应用程序。一个在 asp.net webforms main.test.com 上,它应该提供身份验证,用户登录,我可以使用 cookie 在我位于 myApp.test.com 的 asp.net mvc 应用程序上进行身份验证。
我想做的就是访问 cookie,这样我就可以使用 FormsAuthentication 获取存储在其中的 userId。
他们使用微软提供的普通身份验证;
<authentication mode="Forms">
<forms domain="test.com" loginUrl="Default.aspx" protection="All" path="/" requireSSL="false" timeout="45" name=".ASPXAUTH" slidingExpiration="true" defaultUrl="Default.aspx" cookieless="UseDeviceProfile" enableCrossAppRedirects="false"/>
</authentication>
test.com 上的任何子主网都应该可以访问此 cookie,对吧?
【问题讨论】:
标签: asp.net asp.net-mvc