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. Advertisements

  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. Advertisements

  3. Brian Muth

    Brian Muth Guest

    (Slap hand on forehead) Of course!

    Thanks, Edwin.

    Brian
     
    Brian Muth, Nov 25, 2005
    #3
    1. Advertisements

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. Hermit Dave

    Forms Login Page Not Login Out

    Hermit Dave, Jan 12, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    791
    Hermit Dave
    Jan 13, 2004
  2. Eric
    Replies:
    2
    Views:
    1,794
    Tommy
    Feb 13, 2004
  3. Pascal Blanchard
    Replies:
    0
    Views:
    408
    Pascal Blanchard
    Aug 17, 2004
  4. Pascal Blanchard
    Replies:
    1
    Views:
    425
    Pascal Blanchard
    Aug 18, 2004
  5. Markus R.
    Replies:
    6
    Views:
    988
    Steven Cheng[MSFT]
    Jan 18, 2006
  6. Keltex
    Replies:
    1
    Views:
    562
    Dominick Baier [DevelopMentor]
    Jan 24, 2006
  7. Eric
    Replies:
    2
    Views:
    946
  8. GregoryJ
    Replies:
    3
    Views:
    1,869
    GregoryJ
    May 8, 2009
Loading...