Forms authentication with images on the login page

Discussion in 'ASP .Net' started by Brian Muth, Nov 25, 2005.

  1. Brian Muth

    Brian Muth Guest

    I'm pretty new to the ASP.NET world, and would appreciate some advise
    regarding Forms authentication.

    My login page has some GIF images which I'd like displayed. However, because
    I haven't logged in yet, the GIF images are blanked out, unless I explicitly
    allow access in the web.config file, as in:

    <location path="buttons/SignInLogo.gif">
    <system.web>
    <authorization>
    <allow users="*" />
    </authorization>
    </system.web>
    </location>



    The problem, is I've got a dozen or so GIF's, and would like to add more.
    Isn't there a better way than polluting my web.config file with all these
    location tags?



    Brian
    Brian Muth, Nov 25, 2005
    #1
    1. Advertising

  2. Put the web.config (copy) in the images dir, remove the path from both.
    This is the easiest, like (in the images folder):

    <?xml version="1.0" encoding="utf-8"?>
    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    <system.web>
    <authorization>
    <allow users="*" />
    </authorization>
    </system.web>
    </configuration>


    "Brian Muth" <> schreef in bericht
    news:...
    > I'm pretty new to the ASP.NET world, and would appreciate some advise
    > regarding Forms authentication.
    >
    > My login page has some GIF images which I'd like displayed. However,
    > because I haven't logged in yet, the GIF images are blanked out, unless I
    > explicitly allow access in the web.config file, as in:
    >
    > <location path="buttons/SignInLogo.gif">
    > <system.web>
    > <authorization>
    > <allow users="*" />
    > </authorization>
    > </system.web>
    > </location>
    >
    >
    >
    > The problem, is I've got a dozen or so GIF's, and would like to add more.
    > Isn't there a better way than polluting my web.config file with all these
    > location tags?
    >
    >
    >
    > Brian
    >
    >
    Edwin Knoppert, Nov 25, 2005
    #2
    1. Advertising

  3. Brian Muth

    Brian Muth Guest

    (Slap hand on forehead) Of course!

    Thanks, Edwin.

    Brian
    Brian Muth, Nov 25, 2005
    #3
    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. Eric
    Replies:
    2
    Views:
    1,405
    Tommy
    Feb 13, 2004
  2. Pascal Blanchard
    Replies:
    0
    Views:
    239
    Pascal Blanchard
    Aug 17, 2004
  3. Pascal Blanchard
    Replies:
    1
    Views:
    272
    Pascal Blanchard
    Aug 18, 2004
  4. Keltex
    Replies:
    1
    Views:
    388
    Dominick Baier [DevelopMentor]
    Jan 24, 2006
  5. Eric
    Replies:
    2
    Views:
    467
Loading...

Share This Page