【发布时间】:2010-09-24 01:06:09
【问题描述】:
我将如何为我的网络应用程序的不同部分设置不同的身份验证标签?说我有:
/
/folder1/
/folder2/
是否可以为每个文件夹指定不同的<authentication/> 标签?
我希望文件夹 1 使用 Windows 身份验证,但文件夹 2 使用表单身份验证。
我尝试在<location/> 标记中进行操作,但看起来您不能在<location/> 标记中使用<authentication/> 标记,至少不能通过内置网络服务器的VS 2008。
这个错误说 - 错误 3 使用注册为 allowDefinition='MachineToApplication' 的部分超出应用程序级别是错误的。此错误可能是由未在 IIS 中配置为应用程序的虚拟目录引起的。
<location path="/folder1">
<system.web>
<authentication mode="Forms" />
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location>
【问题讨论】:
标签: asp.net authentication web-config location