简体   繁体   English

在ASP.NET应用程序中保护经典ASP页面

[英]Protect Classic ASP Page within an ASP.NET Application

I would like to restrict access to a classic asp page that is contained within an ASP.NET application that uses Forms Authentication. 我想限制对使用表单身份验证的ASP.NET应用程序中包含的经典ASP页面的访问。

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. 我的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'. 我在“经典”管道模式下运行,没有选择切换到“集成”的选项。

One option would be to embed the pages in an ASP.NET page using Server.Execute. 一种选择是使用Server.Execute将页面嵌入到ASP.NET页面中。 This approach should allow you to incorporate authentication into the legacy ASP pages. 这种方法应允许您将身份验证合并到旧版ASP页面中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM