Professional Web Applications Themes

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

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

  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. #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" <nospammsmobiles.com> wrote in message
    news:OYUdXZFbEHA.1292TK2MSFTNGP10.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

  3. #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" <nospammsmobiles.com> wrote in message
    news:OYUdXZFbEHA.1292TK2MSFTNGP10.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

Similar Threads

  1. Replies: 1
    Last Post: September 8th, 10:58 AM
  2. Replies: 1
    Last Post: July 18th, 12:45 AM
  3. Forms Auth and none aspx pages
    By Michael Tissington in forum ASP.NET Security
    Replies: 3
    Last Post: October 9th, 09:17 PM
  4. Two authentication dialogs displayed for aspx pages
    By Kathy in forum ASP.NET Security
    Replies: 0
    Last Post: July 30th, 08:47 PM
  5. Adding aspx pages to a static FrontPage site
    By Ken Fichthorn in forum ASP.NET General
    Replies: 0
    Last Post: July 28th, 06:32 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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