forms authentication and wildcard mappings on UNC share

Discussion in 'ASP .Net Security' started by Fabrizio Cipriani, May 9, 2007.

  1. I am trying to configure a UNC share where to put the files, since my
    application is load balanced on a web cluster. I have configured the
    application with forms authentication.

    When I try to access files in the UNC share, the login form doesn't pop up.
    I have also written a simple httphandler for testing purposes, but it isn't
    invoked on the UNC share, while it is invoked for files in the application
    root directory.

    - The UNC share is defined as a virtual directory under the application root.
    - I CAN open the files in the UNC share, it's just the authentication the
    doesn't work

    web.config in application root:
    <?xml version="1.0"?>
    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    <appSettings/>
    <system.web>
    <httpHandlers>
    <add verb="*" path="*.txt"
    type="SecurityHttpHandler"/>
    </httpHandlers>
    <compilation debug="true" strict="false" explicit="true"/>
    <authentication mode="Forms">
    <forms name="appNameAuth" loginUrl="/dotnettest/login.aspx" protection="All"
    />
    </authentication>
    <identity impersonate="true" userName="rightname"
    password="rightpassword"/>
    </system.web>
    </configuration>

    web.config in UNC share:
    <?xml version="1.0"?>
    <configuration>
    <connectionStrings/>
    <location path="accesstest.txt">
    <system.web>
    <authorization>
    <deny users="?"/>
    <allow users="*"/>
    </authorization>
    </system.web>
    </location>
    </configuration>

    When i try to access "accesstest.txt" authentication doesnt' kick in.

    Thanks in advance,
    Fabrizio Cipriani
    Fabrizio Cipriani, May 9, 2007
    #1
    1. Advertising

  2. just to keep this thread updated: creating another virtual directory
    connected to the same UNC share did solve the problem.

    I still have my old virtual dir with nothing different from the new one
    except the name, but the old won't work, the new one will (authentication,
    login.aspx, httphandler, everything is correctly invoked).

    I'll keep the post updated, should I ever find the reason why.
    f.c.

    "Fabrizio Cipriani" wrote:

    > I am trying to configure a UNC share where to put the files, since my
    > application is load balanced on a web cluster. I have configured the
    > application with forms authentication.
    >
    > When I try to access files in the UNC share, the login form doesn't pop up.
    > I have also written a simple httphandler for testing purposes, but it isn't
    > invoked on the UNC share, while it is invoked for files in the application
    > root directory.
    >
    > - The UNC share is defined as a virtual directory under the application root.
    > - I CAN open the files in the UNC share, it's just the authentication the
    > doesn't work
    >
    > web.config in application root:
    > <?xml version="1.0"?>
    > <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    > <appSettings/>
    > <system.web>
    > <httpHandlers>
    > <add verb="*" path="*.txt"
    > type="SecurityHttpHandler"/>
    > </httpHandlers>
    > <compilation debug="true" strict="false" explicit="true"/>
    > <authentication mode="Forms">
    > <forms name="appNameAuth" loginUrl="/dotnettest/login.aspx" protection="All"
    > />
    > </authentication>
    > <identity impersonate="true" userName="rightname"
    > password="rightpassword"/>
    > </system.web>
    > </configuration>
    >
    > web.config in UNC share:
    > <?xml version="1.0"?>
    > <configuration>
    > <connectionStrings/>
    > <location path="accesstest.txt">
    > <system.web>
    > <authorization>
    > <deny users="?"/>
    > <allow users="*"/>
    > </authorization>
    > </system.web>
    > </location>
    > </configuration>
    >
    > When i try to access "accesstest.txt" authentication doesnt' kick in.
    >
    > Thanks in advance,
    > Fabrizio Cipriani
    >
    >
    >
    >
    >
    Fabrizio Cipriani, May 17, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QWRhbQ==?=

    wildcard mappings/httpmodule/asp.net 2.0/iis6

    =?Utf-8?B?QWRhbQ==?=, May 19, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    634
    Steven Cheng[MSFT]
    May 23, 2005
  2. Tiziana Loporchio MCSD.NET

    Wildcard application Mappings disable default documents

    Tiziana Loporchio MCSD.NET, Oct 12, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    391
    Tiziana Loporchio MCSD.NET
    Oct 12, 2005
  3. SlimFlem
    Replies:
    7
    Views:
    721
    John Timney \( MVP \)
    Dec 22, 2005
  4. Jereme

    aspnet UNC file share authentication

    Jereme, Sep 30, 2005, in forum: ASP .Net Security
    Replies:
    2
    Views:
    204
    Jereme
    Oct 1, 2005
  5. Saraswati lakki
    Replies:
    0
    Views:
    1,283
    Saraswati lakki
    Jan 6, 2012
Loading...

Share This Page