【发布时间】:2012-10-08 04:52:53
【问题描述】:
我希望为通配符子域应用程序实施简单成员身份验证。用户将登录到根站点(即 www.localhost.com)并被重定向到伪子域站点(www.user1.localhost.com)。服务器上只有一个应用程序。
以下用于身份验证的 web.config 条目不起作用:
<authentication mode="Forms">
<forms loginUrl="~/Account/SignIn" timeout="2880" domain=".localhost" />
</authentication>
上述条目不会对进入根站点或任何用户特定站点的用户进行身份验证。我的本地 hosts 文件配置正确。
这种身份验证方案是否可以使用简单成员资格?我错过了一步吗?
【问题讨论】:
标签: asp.net-mvc asp.net-mvc-4 forms-authentication simplemembership