Handling Authentication for all elements on a website

Discussion in 'ASP .Net' started by Guest, Mar 1, 2005.

  1. Guest

    Guest Guest

    A Dilemma that I keep being faced with is a scenario where I require
    authentication on virtually everything. HTMl files, GIF files, XML files,
    JavaScript files and etc. And I am constantly dealing with Administrators
    who refuse to allow me to map items so that asp.net handles authentication
    for it.

    I am wondering is it possilbe to make ASP.NET handle the authentication
    for documents such as .HTML/.gif/.xml/.js without having to manually have
    access to the server and assigning all files to be handled by IIS?
     
    Guest, Mar 1, 2005
    #1
    1. Advertising

  2. You can add the file name into the web.config

    This way:

    <location path="Default.aspx">
    <system.web>
    <authorization>
    <deny users="?"/>
    </authorization>
    </system.web>
    </location>
    <location path="defualt.aspx">
    <system.web>
    <authorization>
    <deny users="?"/>
    </authorization>
    </system.web>
    </location>
    <location path="picture.gif">
    <system.web>
    <authorization>
    <deny users="?"/>
    </authorization>
    </system.web>
    </location>


    "" wrote:

    > A Dilemma that I keep being faced with is a scenario where I require
    > authentication on virtually everything. HTMl files, GIF files, XML files,
    > JavaScript files and etc. And I am constantly dealing with Administrators
    > who refuse to allow me to map items so that asp.net handles authentication
    > for it.
    >
    > I am wondering is it possilbe to make ASP.NET handle the authentication
    > for documents such as .HTML/.gif/.xml/.js without having to manually have
    > access to the server and assigning all files to be handled by IIS?
    >
    >
    >
     
    =?Utf-8?B?QWxiZXJ0IFBhc2N1YWw=?=, Mar 1, 2005
    #2
    1. Advertising

  3. Guest

    Scott Allen Guest

    With IIS 5 & 6 you have to route requests to the ASP.NET runtime
    through script mappings.

    Perhaps you could give them a script or program to run on the server
    and perform the configuration programatically?

    --
    Scott
    http://www.OdeToCode.com/blogs/scott/

    On Tue, 1 Mar 2005 13:23:57 -0600, <> wrote:

    >A Dilemma that I keep being faced with is a scenario where I require
    >authentication on virtually everything. HTMl files, GIF files, XML files,
    >JavaScript files and etc. And I am constantly dealing with Administrators
    >who refuse to allow me to map items so that asp.net handles authentication
    >for it.
    >
    > I am wondering is it possilbe to make ASP.NET handle the authentication
    >for documents such as .HTML/.gif/.xml/.js without having to manually have
    >access to the server and assigning all files to be handled by IIS?
    >
     
    Scott Allen, Mar 1, 2005
    #3
  4. Guest

    Guest Guest

    I think if the problem were that simple, then I would not be posting the
    problem. <location only works if the file is mapped to IIS. The files cannot
    be be mapped to IIS for external administrative reasons, reasons that go
    beyond not having physical or remote control of the server.

    I am wondering if other people have been responsible for securing
    non-asp.net content that have needed to share the same credentials as the
    asp.net application and have been faced with the above restrictments. And if
    so whether they had come up with something that was useful..




    <> wrote in message
    news:...
    >A Dilemma that I keep being faced with is a scenario where I require
    >authentication on virtually everything. HTMl files, GIF files, XML files,
    >JavaScript files and etc. And I am constantly dealing with Administrators
    >who refuse to allow me to map items so that asp.net handles authentication
    >for it.
    >
    > I am wondering is it possilbe to make ASP.NET handle the authentication
    > for documents such as .HTML/.gif/.xml/.js without having to manually have
    > access to the server and assigning all files to be handled by IIS?
    >
    >
     
    Guest, Mar 2, 2005
    #4
  5. Hi Recoil,

    Thanks for your posting. As for router the authentication request of the
    static contens to asp.net , I'm afraid there is no any means currently.
    Since the IIS directly handle the coming requests , the asp.net won't have
    chance to join the request processing. Curently I think the only means are :
    1. contact the web host's admin for configuring the static contents's
    extentsion to ASPNET isapi dll.

    2. Output those contents(images or scripfiles) dynamically through a custom
    asp.net httphandler.

    Thanks,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    Steven Cheng[MSFT], Mar 3, 2005
    #5
    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. Wolfgang Lipp
    Replies:
    1
    Views:
    404
    Patrick TJ McPhee
    Jan 30, 2004
  2. Gerald Aichholzer
    Replies:
    2
    Views:
    2,509
    Gerald Aichholzer
    Jun 27, 2006
  3. Bart Van der Donck

    disable all elements from all forms except <textarea>'s

    Bart Van der Donck, Feb 1, 2005, in forum: Javascript
    Replies:
    3
    Views:
    116
    Stephen Chalmers
    Feb 1, 2005
  4. Replies:
    1
    Views:
    119
  5. Replies:
    4
    Views:
    188
Loading...

Share This Page