【发布时间】:2011-03-01 05:11:18
【问题描述】:
我正在尝试将 ASP.NET 安全性与经典 ASP 集成。 就像在下一篇文章中一样 - http://weblogs.asp.net/scottgu/archive/2007/03/04/tip-trick-integrating-asp-net-security-with-classic-asp-and-non-asp-net-urls.aspx,但我使用的是 IIS 7.0 而不是 IIS 6.0,例如示例。
您可以在下面找到我的配置文件(添加通配符脚本标签后)
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers accessPolicy="Read, Script">
<add name="ISAPI x64" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
<add name="ISAPI x32" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
</handlers>
</system.webServer>
<system.web>
<authentication mode="Forms">
<forms loginUrl="Login.aspx"></forms>
</authentication>
</system.web>
<location path="page.asp">
<system.web>
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="default.asp">
<system.web>
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>
</system.web>
</location>
</configuration>
但应用程序调用 ASP 页面时无需任何身份验证。
我以前没有使用过经典 ASP,因此我一直在寻找任何可以帮助我的信息。
我发现了另一篇感兴趣的文章http://support.microsoft.com/kb/891028 - “使用表单身份验证保护经典 ASP 页面”部分。 不错的解决方案,但在这种情况下,我需要在每个页面上实现安全代码(ASP 脚本代码)。
下一句是否意味着第一个解决方案行不通?
设计不支持使用表单身份验证保护经典 ASP 页面,因为 ASP 和 ASP.NET 使用不同的处理程序...
谁能选择我在 IIS 7.0 上为经典 ASP 进行基于表单身份验证的解决方案/方式?
【问题讨论】:
标签: .net iis-7 asp-classic forms-authentication