Re: Forms authentication doesn't work for downloads

From: Teemu Keiski (joteke_at_aspalliance.com)
Date: 11/23/04


Date: Tue, 23 Nov 2004 22:49:12 +0200

Forms Auth works only for those pages/file/resources which are processed by
ASP.NET by default. That is aspx,asmx, config and such. You can tweak that
in IIS (See Applications configuration for different file extensions like
where aspx is mapped to aspnet_isapi.dll) by having the custom file
extension mapped for aspnet_isapi.dll

See this blog post for detailed explanations:

Protect PDF, DOC and other file types with Forms Authentication
http://dotnetjunkies.com/WebLog/richard.dudley/archive/2004/05/21/14215.aspx

-- 
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsider
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
"Peter Afonin" <pva@speakeasy.net> wrote in message
news:%23iyeHzZ0EHA.2316@TK2MSFTNGP15.phx.gbl...
> Hello,
>
> I'm using Forms authentication, and it works well. If user is not
> authenticated, he is routed to the login page.Protect PDF, DOC and other
file types with Forms Authentication
>
> However, this doesn't work for downloads. If I have a file located in the
> restricted area and put a direct link to it - anyone can download it.
>
> Why is this? I expected that people would also be routed to the login
> screen. How to make this happen?
>
> I would appreciate your help.
>
> Thank you,
>
> -- 
> Peter Afonin
>
>


Relevant Pages

  • Re: SSH to LDAP
    ... Can't seem to get the config file right. ... login I get the following error ... PAM: authentication thread exited unexpectedly ... The PAM config should be basically the same for both (mostly ...
    (comp.security.ssh)
  • Re: Default page code
    ... It's mostly just setting a few config values and the rest is mostly ... >> Forms Authentication is usually your best bet in ASP.NET. ... >>> What code I need on the default page to call login page if the current ... >>> Regards ...
    (microsoft.public.dotnet.framework.aspnet)
  • Forms authentication doesnt work for downloads
    ... I'm using Forms authentication, and it works well. ... this doesn't work for downloads. ... I expected that people would also be routed to the login ... Peter Afonin ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Authentication problem
    ... I've a strange problem using Integrated Authentication on an IIS 5 hosted ... No matter what config I use IE will always prompt for user, ... Intranet site added to IE Local Intranet security Zone and IE security ...
    (microsoft.public.inetserver.iis.security)
  • Re: Problems Sending Email,,, Corrupt Windows Component?
    ... require authentication to the SMTP and that I've got everything properly ... Outlook Express and my ISP. ... >> config settings are correct. ... The most common cause for this error is that you have smtp set ...
    (microsoft.public.windowsxp.general)