开发者

Protect Classic ASP Page within an ASP.NET Application

开发者 https://www.devze.com 2023-03-30 15:15 出处:网络
I would like to restrict access to a classic asp page that is contained within an ASP.NET application that uses Forms Authentication.

I would like to restrict access to a classic asp page that is contained within an ASP.NET application that uses Forms Authentication.

Is there a way to configure forms authentication so that it will restrict access to these pages? I have开发者_高级运维 the following in my web.config.

<location>
    <system.web>
      <authorization>
        <deny users="?" />
      </authorization>
    </system.web>
</location>

I am running in 'classic' pipeline mode and I don't have the option of switching to 'integrated'.


Start here:

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


One option would be to embed the pages in an ASP.NET page using Server.Execute. This approach should allow you to incorporate authentication into the legacy ASP pages.

0

精彩评论

暂无评论...
验证码 换一张
取 消