简体   繁体   中英

Authentication in IIS and classic ASP

I have a classic ASP web application (not ASP.NET).

The application has it's own authentication mechanism, handled in asp files. The problem is, the authentication is triggered only when an asp file is requested. I want it to trigger when any (static file) is requested as well (eg there are pdfs stored in some directories and I would like to make them available only to logged in users). The same for static HTML pages.

How can this be achieved?

Map the PDF file to aspnet_isapi.dll in IIS.

You can then use Forms authentication which is a part of ASP.NET and comes outside the box.

If you don't want to use .NET at all, you can write an ISAPI filter or extension that can handle this for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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