Authentication problems

Discussion in 'ASP .Net' started by Freddy, Jun 15, 2004.

  1. Freddy

    Freddy Guest

    Hi,

    I have implemented Forms authentication in my website. But I am getting "You
    are not authorized to view this page" when i try to access a protected file
    in folder2.

    In the root of the website there are two folders(folder1 and folder2) and
    many other .aspx files.
    Files in folder2 are protected. Login page is in folder2. Web.config file in
    folder2 is as follows,

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    <system.web>
    <authorization>
    <deny users="?" />
    </authorization>
    </system.web>
    <location path="existinguserslogin.aspx">
    <system.web>
    <authorization>
    <allow users="?"/>
    </authorization>
    </system.web>
    </location>
    </configuration>

    This error is happening only when I uploaded the website to the production
    server(win 2003). On development server(Win 2000 Adv) evrything works fine.

    Can anyone guide me as to what is going wrong

    Freddy
     
    Freddy, Jun 15, 2004
    #1
    1. Advertising

  2. Freddy

    Freddy Guest

    Thanks ranganh.

    In the IIS control pnale under WebServices extension asp.net allowed is
    there.
    I figured out the problem. I am trying to access the protected pages using
    https: and in the web.config file in the root folder I am using https in the
    loginUrl for the form authentication. I removed this https and specified the
    file name directly and it worked.

    Freddy

    "ranganh" <> wrote in message
    news:...
    > Dear Freddy,
    >
    > First let me know if you are able to access other pages.
    >
    > Basically in Windows 2003, asp.net is prohibited by default and you have

    to enable the same.
    >
    > Go to IIS Control panel and check the WebServices Extension. It will

    display a list of accounts. Make the asp.net "Allowed". That would solve
    the problem.
    >
    > If you have done that already and are able to browse the other pages, let

    me know.
    >
    > Thanks.
    >
    >
    >
    > "Freddy" wrote:
    >
    > > Hi,
    > >
    > > I have implemented Forms authentication in my website. But I am getting

    "You
    > > are not authorized to view this page" when i try to access a protected

    file
    > > in folder2.
    > >
    > > In the root of the website there are two folders(folder1 and folder2)

    and
    > > many other .aspx files.
    > > Files in folder2 are protected. Login page is in folder2. Web.config

    file in
    > > folder2 is as follows,
    > >
    > > <?xml version="1.0" encoding="utf-8" ?>
    > > <configuration>
    > > <system.web>
    > > <authorization>
    > > <deny users="?" />
    > > </authorization>
    > > </system.web>
    > > <location path="existinguserslogin.aspx">
    > > <system.web>
    > > <authorization>
    > > <allow users="?"/>
    > > </authorization>
    > > </system.web>
    > > </location>
    > > </configuration>
    > >
    > > This error is happening only when I uploaded the website to the

    production
    > > server(win 2003). On development server(Win 2000 Adv) evrything works

    fine.
    > >
    > > Can anyone guide me as to what is going wrong
    > >
    > > Freddy
    > >
    > >
    > >
     
    Freddy, Jun 16, 2004
    #2
    1. Advertising

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. Andrew Connell
    Replies:
    1
    Views:
    546
    Natty Gur
    Oct 21, 2003
  2. raj mandadi
    Replies:
    0
    Views:
    429
    raj mandadi
    Dec 22, 2003
  3. Brett Porter
    Replies:
    2
    Views:
    767
    Andrea D'Onofrio [MSFT]
    Jan 20, 2004
  4. Mark
    Replies:
    0
    Views:
    677
  5. Brett Porter
    Replies:
    5
    Views:
    588
    Brett Porter
    Feb 3, 2004
Loading...

Share This Page