forms authentication: redirects for *.aspx pages only, not for other extensions, not for static content

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default forms authentication: redirects for *.aspx pages only, not for other extensions, not for static content

    Hi!

    I am using something like this in web.config :

    <authentication mode="Forms">
    <forms name=".MSMOBILES_COM___COOKIE"
    loginUrl="login.aspx"
    protection="All"
    timeout="30"
    path="/">
    <credentials passwordFormat="Clear">
    <user name="user1" password="password1"/>
    </credentials>
    </forms>
    </authentication>
    </authentication>

    then, when I try to access some *.aspx page, for example:

    myserver.com/kirk.aspx

    I get redirection to:

    myserver.com/login.aspx?ReturnUrl=%2fportal%2fdupa.aspx

    and then everything is OK, but when try to access some other pages and
    content for example:

    myserver.com/test1.html
    or
    myservrc.com/test1.gif

    ..... then NO REDIRECTION takes place and the server allows access to this
    content!!!!
    How to force IIS to make rediredction also in case of static (i.e. not
    *.aspx) content????







    www.MSmobiles.com Guest

  2. Similar Questions and Discussions

    1. Solution to Forms Authentication redirecting to bogus default.aspx page with RedirectFromLoginPage
      hi, i've read a lot of posts here about people who ran into problems using forms authentication, and the RedirectFromLoginPage() method, which...
    2. forms authentication doesn't work for static pages/files like GIF/HTML/PDF ?
      do I understand it correctly that forms authentication doesn't work for static pages/files like GIF/HTML/PDF ? so I cannot convince IIS to...
    3. Forms Auth and none aspx pages
      I have forms authentication working for any aspx page (I'm doing this on both a folder level and also individual files). The problem I have is if...
    4. Two authentication dialogs displayed for aspx pages
      I have a web application that uses both asp and aspx pages. We are using basic authentication. When someone tries to access an asp page, they...
    5. Adding aspx pages to a static FrontPage site
      I have a very simple website, built in FrontPage 2002, which displays static information only. I would like to add some ASP.NET web forms...
  3. #2

    Default Re: forms authentication: redirects for *.aspx pages only, not for other extensions, not for static content

    You can only redirect " .aspx pages" with default IIS Settings. If you want
    to redirect for other content i.e. .htm, .gif you have to map those files in
    IIS to get it processed by aspnet_isapi.dll.

    "www.MSmobiles.com" <nospam@msmobiles.com> wrote in message
    news:OYUdXZFbEHA.1292@TK2MSFTNGP10.phx.gbl...
    > Hi!
    >
    > I am using something like this in web.config :
    >
    > <authentication mode="Forms">
    > <forms name=".MSMOBILES_COM___COOKIE"
    > loginUrl="login.aspx"
    > protection="All"
    > timeout="30"
    > path="/">
    > <credentials passwordFormat="Clear">
    > <user name="user1" password="password1"/>
    > </credentials>
    > </forms>
    > </authentication>
    > </authentication>
    >
    > then, when I try to access some *.aspx page, for example:
    >
    > myserver.com/kirk.aspx
    >
    > I get redirection to:
    >
    > myserver.com/login.aspx?ReturnUrl=%2fportal%2fdupa.aspx
    >
    > and then everything is OK, but when try to access some other pages and
    > content for example:
    >
    > myserver.com/test1.html
    > or
    > myservrc.com/test1.gif
    >
    > .... then NO REDIRECTION takes place and the server allows access to this
    > content!!!!
    > How to force IIS to make rediredction also in case of static (i.e. not
    > *.aspx) content????
    >
    >
    >
    >
    >
    >
    >


    Hardip Wadhwa Guest

  4. #3

    Default Re: forms authentication: redirects for *.aspx pages only, not for other extensions, not for static content

    You can only redirect " .aspx pages" with default IIS Settings. If you want
    to redirect for other content i.e. .htm, .gif you have to map those files in
    IIS to get it processed by aspnet_isapi.dll.

    "www.MSmobiles.com" <nospam@msmobiles.com> wrote in message
    news:OYUdXZFbEHA.1292@TK2MSFTNGP10.phx.gbl...
    > Hi!
    >
    > I am using something like this in web.config :
    >
    > <authentication mode="Forms">
    > <forms name=".MSMOBILES_COM___COOKIE"
    > loginUrl="login.aspx"
    > protection="All"
    > timeout="30"
    > path="/">
    > <credentials passwordFormat="Clear">
    > <user name="user1" password="password1"/>
    > </credentials>
    > </forms>
    > </authentication>
    > </authentication>
    >
    > then, when I try to access some *.aspx page, for example:
    >
    > myserver.com/kirk.aspx
    >
    > I get redirection to:
    >
    > myserver.com/login.aspx?ReturnUrl=%2fportal%2fdupa.aspx
    >
    > and then everything is OK, but when try to access some other pages and
    > content for example:
    >
    > myserver.com/test1.html
    > or
    > myservrc.com/test1.gif
    >
    > .... then NO REDIRECTION takes place and the server allows access to this
    > content!!!!
    > How to force IIS to make rediredction also in case of static (i.e. not
    > *.aspx) content????
    >
    >
    >
    >
    >
    >
    >

    Hardip Wadhwa Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139