Bypass forms authentication

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

  1. #1

    Default Bypass forms authentication

    My application uses forms-based authentication.
    In my .NET project I have a subfolder to store forms that display
    user-friendly error messages to the user.
    I also have an http module to handle prerequests for creating my database
    objects and connections. If the database connection fails I want the user
    to be redirected to one of my error pages. The problem is if the connection
    fails before the user has an opportunity to authenticate then the user gets
    redirect to the error page, which in turn redirects them to the sign-in
    page, which in turn fails to connect to the db and redirects them to the
    error page (and round and round we go!). I created a web.config file for my
    subfolder and set the authorization to allow all users, but it's not
    allowing the user to see the error page and still invokes forms
    authentication by using the authentication and authorization settings in the
    parent web.config file. If I go to the error page by typing in the URL
    directly it works, but it doesn't work if I redirect in the code.

    How can I allow redirection to a page in the project and bypass the
    authentication on a subfolder or form basis? Should the child web.config
    file override the parent and allow all users if I choose?

    Thx, Chris


    CJF Guest

  2. Similar Questions and Discussions

    1. Accessing htm files without authentication (forms authentication)
      I have application with forms authentication. All works fine. When user opens .aspx file gets login form, login and then get the .aspx page. But...
    2. ASP.Net Forms authentication with basic authentication popup
      Relatively new to ASP.Net but have a strange problem. My site uses forms authentication for a large administration section however after the user...
    3. Forms authentication then redirection to a secure web with NT authentication?
      Hi, I want to allow access to particular secured intranet web sites. These intranet are stored in sharepoint (2003 version) Actually I've...
    4. Authentication ticket, cookieless, forms authentication?
      Hi. I want to use Forms Authentication, cookieless. The issue is setting the Authentication Ticket without using cookies (!) That is, the...
    5. Forms authentication with Windows authentication
      Hi, I have an ASP.NET web site that uses IIS Basic Authentication and accesses an OLAP Server at various stages. The OLAP Server authentication...
  3. #2

    Default Re: Bypass forms authentication

    Hi Chris,
    Add this after the first </sytem>
    before </configuration>
    <location path="FOLDERNAME">
    <system.web>
    <compilation defaultLanguage="vb/c#" debug="true" />
    <authorization>
    <allow users="*"/>
    </authorization>
    </system.web>
    </location>
    Check it out This Works.
    Arvind
    "CJF" <chrisf@unr.edu> wrote in message
    news:up$W7phAEHA.1796@TK2MSFTNGP12.phx.gbl...
    > My application uses forms-based authentication.
    > In my .NET project I have a subfolder to store forms that display
    > user-friendly error messages to the user.
    > I also have an http module to handle prerequests for creating my database
    > objects and connections. If the database connection fails I want the user
    > to be redirected to one of my error pages. The problem is if the
    connection
    > fails before the user has an opportunity to authenticate then the user
    gets
    > redirect to the error page, which in turn redirects them to the sign-in
    > page, which in turn fails to connect to the db and redirects them to the
    > error page (and round and round we go!). I created a web.config file for
    my
    > subfolder and set the authorization to allow all users, but it's not
    > allowing the user to see the error page and still invokes forms
    > authentication by using the authentication and authorization settings in
    the
    > parent web.config file. If I go to the error page by typing in the URL
    > directly it works, but it doesn't work if I redirect in the code.
    >
    > How can I allow redirection to a page in the project and bypass the
    > authentication on a subfolder or form basis? Should the child web.config
    > file override the parent and allow all users if I choose?
    >
    > Thx, Chris
    >
    >

    Arvind P Rangan Guest

  4. #3

    Default Re: Bypass forms authentication

    Hi Arvind,
    I tried using the location element and it still loops between pages. I
    placed the location block in my project's web.config and when that didn't
    work, I put it in my subfolder's web.config. I also tried specifying a
    specific file. I'm wondering if it's the ordering of events that still
    causing it, since I'm doing the db connect on the prerequest event. I don't
    know at what stage the web.config file is interpreted.
    I'll have to find some other way to work around that.

    "Arvind P Rangan" <arvind99@hotmail.com> wrote in message
    news:egmluOpAEHA.712@tk2msftngp13.phx.gbl...
    > Hi Chris,
    > Add this after the first </sytem>
    > before </configuration>
    > <location path="FOLDERNAME">
    > <system.web>
    > <compilation defaultLanguage="vb/c#" debug="true" />
    > <authorization>
    > <allow users="*"/>
    > </authorization>
    > </system.web>
    > </location>
    > Check it out This Works.
    > Arvind
    > "CJF" <chrisf@unr.edu> wrote in message
    > news:up$W7phAEHA.1796@TK2MSFTNGP12.phx.gbl...
    > > My application uses forms-based authentication.
    > > In my .NET project I have a subfolder to store forms that display
    > > user-friendly error messages to the user.
    > > I also have an http module to handle prerequests for creating my
    database
    > > objects and connections. If the database connection fails I want the
    user
    > > to be redirected to one of my error pages. The problem is if the
    > connection
    > > fails before the user has an opportunity to authenticate then the user
    > gets
    > > redirect to the error page, which in turn redirects them to the sign-in
    > > page, which in turn fails to connect to the db and redirects them to the
    > > error page (and round and round we go!). I created a web.config file
    for
    > my
    > > subfolder and set the authorization to allow all users, but it's not
    > > allowing the user to see the error page and still invokes forms
    > > authentication by using the authentication and authorization settings in
    > the
    > > parent web.config file. If I go to the error page by typing in the URL
    > > directly it works, but it doesn't work if I redirect in the code.
    > >
    > > How can I allow redirection to a page in the project and bypass the
    > > authentication on a subfolder or form basis? Should the child
    web.config
    > > file override the parent and allow all users if I choose?
    > >
    > > Thx, Chris
    > >
    > >
    >
    >

    CJF 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