No images on login screen - forms authentication

Last post 09-07-2007 8:47 AM by jorgearn. 3 replies.

Sort Posts:

  • No images on login screen - forms authentication

    10-03-2005, 2:22 PM
    • Loading...
    • Johnmancuk
    • Joined on 09-21-2005, 5:40 PM
    • Posts 20
    I've migrated an app using Forms Authentication to VS2005 RTM (from VS2003). Works fine, except my login.aspx page cannot see jpg's or the style-sheets!

    When I type in the image address, ie:

    http://localhost:1033/myapp/john.jpg

    I get redirected to the login page again - they seem to be secured by forms auth....? When I'm logged in, the files are visible.

    NB this only happens with the dev web server, IIS still behaves normally and doesn't project the jpg's.

    Is there a workaround?

    Thanks,

    John
    John
  • Re: No images on login screen - forms authentication

    10-04-2005, 3:43 PM
    • Loading...
    • BrockAllen
    • Joined on 05-05-2003, 2:46 PM
    • Providence, RI
    • Posts 1,251
    Sounds like the <authorization> isn't allowing anonymous users to access those files. When hosting in IIS you might see different behavior since IIS serves up those files directly (IOW, ASP.NET is not being asked to serve up those files). So what to do? It's your call, but I'd go ahead and allow those files via the <location> & <authorization> directives in web.config, even if it's just for your own benefit when running cassini (the VS.NET webserver).

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen
  • Re: No images on login screen - forms authentication

    10-05-2005, 3:11 AM
    • Loading...
    • Johnmancuk
    • Joined on 09-21-2005, 5:40 PM
    • Posts 20
    Thanks Brock,

    I've worked around it by creating a new folder for the unprotected resources, and giving it a web.config (allow="*").

    The difference in behaviour between Cassini and IIS may cause people confusion though..

    John
    John
  • Re: No images on login screen - forms authentication

    09-07-2007, 8:47 AM
    • Loading...
    • jorgearn
    • Joined on 09-04-2007, 9:52 AM
    • Tampa FL
    • Posts 1

    Brock,

    I realize that this is an old post but I believe that VS2005, IE7 and IIS7 may have introduced new complexities with this issue.  Images are not being served up on my localhost.  I am able to publish my web app up tp my domain and images are served fine, but again, localhost will not display them.

    Any assistance on this would be greatly appreciated.

    Thanks,

    Jorge

Page 1 of 1 (4 items)
Microsoft Communities
Page view counter