Q: Login Control is behaving strange when site on prod server.

Discussion in 'ASP .Net' started by Martin Arvidsson, Visual Systems AB, Apr 8, 2008.

  1. Hi!

    I published my web application today on a 2003 server with IIS 6 and Net
    Frmwk 2

    I have a root containing

    Default.aspx
    Login.aspx

    Then a folder called /Pages/Order
    under that folder i have severald aspx pages.

    In the /Pages i have a web.config telling that no anonymous users is allowed
    and there for
    the login.aspx is displayed if not logged in.

    The user tries to access the mysite.com/Pages/Order/NewOrder.aspx and will
    be redirected to Login.aspx

    After the user submits the userid and password, it wont redirect to the page
    he/she was trying to access.
    The server tells me that the page doesn't exist.

    I have checked, rights, on the IIS server, filesystem etc. But i cant
    understand why it doesn't work
    If i run it localy it works like a charm.

    Is there a setting on the IIS that needs to be enabled?

    Regards
    Martin
     
    Martin Arvidsson, Visual Systems AB, Apr 8, 2008
    #1
    1. Advertising

  2. Re: Login Control is behaving strange when site on prod server.

    Additional information!

    I see to my horror that pages that are accessible for anonymous users could
    not be
    found either?

    I have a folder called /All

    and when clicking a link on my default.aspx page it wont get there either?!?

    The href of the a tag is pointing like this "/All/Guestpage.aspx"

    What could be wrong?


    "Martin Arvidsson, Visual Systems AB" <> skrev i
    meddelandet news:%...
    > Hi!
    >
    > I published my web application today on a 2003 server with IIS 6 and Net
    > Frmwk 2
    >
    > I have a root containing
    >
    > Default.aspx
    > Login.aspx
    >
    > Then a folder called /Pages/Order
    > under that folder i have severald aspx pages.
    >
    > In the /Pages i have a web.config telling that no anonymous users is
    > allowed and there for
    > the login.aspx is displayed if not logged in.
    >
    > The user tries to access the mysite.com/Pages/Order/NewOrder.aspx and will
    > be redirected to Login.aspx
    >
    > After the user submits the userid and password, it wont redirect to the
    > page he/she was trying to access.
    > The server tells me that the page doesn't exist.
    >
    > I have checked, rights, on the IIS server, filesystem etc. But i cant
    > understand why it doesn't work
    > If i run it localy it works like a charm.
    >
    > Is there a setting on the IIS that needs to be enabled?
    >
    > Regards
    > Martin
    >
     
    Martin Arvidsson, Visual Systems AB, Apr 8, 2008
    #2
    1. Advertising

  3. Re: Login Control is behaving strange when site on prod server.

    You need to create a <location> tag in a web.config
    which points to /All and specifically allows anonymous access.

    <configuration>
    <location path="/All/Guestpage.aspx">
    <system.web>
    <authorization>
    <allow users="*"/>
    </authorization>
    </system.web>
    </location>
    </configuration>

    You can place the location tag either in the root directory or in the /All directory.

    See :
    http://www.dotnetcoders.com/web/Articles/ShowArticle.aspx?article=186

    ....for more detail.



    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en espaƱol : http://asp.net.do/foros/
    ======================================
    "Martin Arvidsson, Visual Systems AB" <> wrote in message
    news:%...
    > Additional information!
    >
    > I see to my horror that pages that are accessible for anonymous users could not be
    > found either?
    >
    > I have a folder called /All
    >
    > and when clicking a link on my default.aspx page it wont get there either?!?
    >
    > The href of the a tag is pointing like this "/All/Guestpage.aspx"
    >
    > What could be wrong?
    >
    >
    > "Martin Arvidsson, Visual Systems AB" <> skrev i meddelandet
    > news:%...
    >> Hi!
    >>
    >> I published my web application today on a 2003 server with IIS 6 and Net Frmwk 2
    >>
    >> I have a root containing
    >>
    >> Default.aspx
    >> Login.aspx
    >>
    >> Then a folder called /Pages/Order
    >> under that folder i have severald aspx pages.
    >>
    >> In the /Pages i have a web.config telling that no anonymous users is allowed and there for
    >> the login.aspx is displayed if not logged in.
    >>
    >> The user tries to access the mysite.com/Pages/Order/NewOrder.aspx and will be redirected to Login.aspx
    >>
    >> After the user submits the userid and password, it wont redirect to the page he/she was trying to access.
    >> The server tells me that the page doesn't exist.
    >>
    >> I have checked, rights, on the IIS server, filesystem etc. But i cant understand why it doesn't work
    >> If i run it localy it works like a charm.
    >>
    >> Is there a setting on the IIS that needs to be enabled?
    >>
    >> Regards
    >> Martin
    >>

    >
    >
     
    Juan T. Llibre, Apr 8, 2008
    #3
    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. Kenneth
    Replies:
    1
    Views:
    384
    Chris Jackson
    Aug 20, 2003
  2. CC
    Replies:
    2
    Views:
    509
  3. Keith-Earl
    Replies:
    4
    Views:
    602
    Keith-Earl
    May 3, 2004
  4. jobs
    Replies:
    0
    Views:
    542
  5. Replies:
    0
    Views:
    383
Loading...

Share This Page