Main form and login form in different folders using Forms Authen

Discussion in 'ASP .Net Security' started by Bruce, Apr 6, 2005.

  1. Bruce

    Bruce Guest

    Having a problem on my site when the login form and the main form are in
    different apps. When the main app redirects to the login form app,
    authorization works but the redirect back always brings up the Windows
    password dialog.

    If I put the two forms in the same app folder, everything works as expected.

    In the former the two apps use identical web.config files (though in
    separate folders) and forms authentication is configured correctly. I've even
    tried creating a custom validation key in the machine.config file of the
    server but the same thing happens.

    What am I doing wrong?

    Bruce
    Bruce, Apr 6, 2005
    #1
    1. Advertising

  2. Bruce

    Joseph MCAD Guest

    April 8, 2005

    If the forms are in seperate folders which are configured to be virtual
    directories, then you will be prompted to sign in when you browse to each
    folder. This is because signing in to one application will grant access to
    that application but browsing to the other folder will cause authentication
    to be required for that application and folder. I hope you see what I mean.
    I would check IIS and make sure that the folders are both not virtual
    directories. HTH

    Joseph MCAD


    "Bruce" <> wrote in message
    news:...
    > Having a problem on my site when the login form and the main form are in
    > different apps. When the main app redirects to the login form app,
    > authorization works but the redirect back always brings up the Windows
    > password dialog.
    >
    > If I put the two forms in the same app folder, everything works as
    > expected.
    >
    > In the former the two apps use identical web.config files (though in
    > separate folders) and forms authentication is configured correctly. I've
    > even
    > tried creating a custom validation key in the machine.config file of the
    > server but the same thing happens.
    >
    > What am I doing wrong?
    >
    > Bruce
    Joseph MCAD, Apr 8, 2005
    #2
    1. Advertising

  3. Bruce

    Bruce Guest

    Re: Main form and login form in different folders using Forms Auth

    They really have to be virtual folders/apps if the login form is an aspx page
    that will be run in another folder. The real question is *how* do I do this?
    How can I have a login form in another app authenticate the first application?

    Bruce

    "Joseph MCAD" wrote:

    > April 8, 2005
    >
    > If the forms are in seperate folders which are configured to be virtual
    > directories, then you will be prompted to sign in when you browse to each
    > folder. This is because signing in to one application will grant access to
    > that application but browsing to the other folder will cause authentication
    > to be required for that application and folder. I hope you see what I mean.
    > I would check IIS and make sure that the folders are both not virtual
    > directories. HTH
    Bruce, Apr 11, 2005
    #3
  4. Bruce

    Joseph MCAD Guest

    Re: Main form and login form in different folders using Forms Auth

    April 11, 2005

    Actually the folder does Not have to be a virtual directory to contain
    ..aspx pages If it is contained within a virtual directory. Such as...

    Root (VDirectory)
    -SubFolder (Non VDirectory)
    -Login.aspx

    Even though the SubFolder is not a vdirectory, it still can contain .aspx
    pages, because it is contained within Root which Is a vdirectory. I hope
    this makes since. :) Have a great day!

    Joseph MCAD



    "Bruce" <> wrote in message
    news:...
    > They really have to be virtual folders/apps if the login form is an aspx
    > page
    > that will be run in another folder. The real question is *how* do I do
    > this?
    > How can I have a login form in another app authenticate the first
    > application?
    >
    > Bruce
    >
    > "Joseph MCAD" wrote:
    >
    >> April 8, 2005
    >>
    >> If the forms are in seperate folders which are configured to be
    >> virtual
    >> directories, then you will be prompted to sign in when you browse to each
    >> folder. This is because signing in to one application will grant access
    >> to
    >> that application but browsing to the other folder will cause
    >> authentication
    >> to be required for that application and folder. I hope you see what I
    >> mean.
    >> I would check IIS and make sure that the folders are both not virtual
    >> directories. HTH

    >
    Joseph MCAD, Apr 11, 2005
    #4
  5. Bruce

    Bruce Guest

    Re: Main form and login form in different folders using Forms Auth

    Maybe I'm describing this incorrectly. I have two separate applications. One
    of the applications has a login form aspx page. I want to use this page from
    the other application. How do I do this?

    "Joseph MCAD" wrote:

    > April 11, 2005
    >
    > Actually the folder does Not have to be a virtual directory to contain
    > ..aspx pages If it is contained within a virtual directory. Such as...
    >
    > Root (VDirectory)
    > -SubFolder (Non VDirectory)
    > -Login.aspx
    >
    > Even though the SubFolder is not a vdirectory, it still can contain .aspx
    > pages, because it is contained within Root which Is a vdirectory. I hope
    > this makes since. :) Have a great day!
    >
    > Joseph MCAD
    >
    >
    >
    > "Bruce" <> wrote in message
    > news:...
    > > They really have to be virtual folders/apps if the login form is an aspx
    > > page
    > > that will be run in another folder. The real question is *how* do I do
    > > this?
    > > How can I have a login form in another app authenticate the first
    > > application?
    > >
    > > Bruce
    > >
    > > "Joseph MCAD" wrote:
    > >
    > >> April 8, 2005
    > >>
    > >> If the forms are in seperate folders which are configured to be
    > >> virtual
    > >> directories, then you will be prompted to sign in when you browse to each
    > >> folder. This is because signing in to one application will grant access
    > >> to
    > >> that application but browsing to the other folder will cause
    > >> authentication
    > >> to be required for that application and folder. I hope you see what I
    > >> mean.
    > >> I would check IIS and make sure that the folders are both not virtual
    > >> directories. HTH

    > >

    >
    >
    >
    Bruce, Apr 11, 2005
    #5
  6. Bruce

    Joseph MCAD Guest

    Re: Main form and login form in different folders using Forms Auth

    April 11, 2005

    I understand now. I am not quite sure (as I haven't ever heard of
    something like this), but I suppose that you could use Forms Authentication
    and create the authentication tickets and cookies yourself. I am not
    familiar with creating them yourself, but I do know that you use the
    FormAuthentication class for most of it. In both applications you could then
    examine the cookie in the same way and if it is not there then redirect to
    that application's login page. Having a cookie authenticate to two
    applications is as secure as having two seperate ones though. I don't know
    whether my above suggestion will work, but you might consider it. Sorry for
    misunderstanding and I wish you the best of luck! :)

    Joseph MCAD



    "Bruce" <> wrote in message
    news:...
    > Maybe I'm describing this incorrectly. I have two separate applications.
    > One
    > of the applications has a login form aspx page. I want to use this page
    > from
    > the other application. How do I do this?
    >
    > "Joseph MCAD" wrote:
    >
    >> April 11, 2005
    >>
    >> Actually the folder does Not have to be a virtual directory to
    >> contain
    >> ..aspx pages If it is contained within a virtual directory. Such as...
    >>
    >> Root (VDirectory)
    >> -SubFolder (Non VDirectory)
    >> -Login.aspx
    >>
    >> Even though the SubFolder is not a vdirectory, it still can contain
    >> .aspx
    >> pages, because it is contained within Root which Is a vdirectory. I hope
    >> this makes since. :) Have a great day!
    >>
    >> Joseph MCAD
    >>
    >>
    >>
    >> "Bruce" <> wrote in message
    >> news:...
    >> > They really have to be virtual folders/apps if the login form is an
    >> > aspx
    >> > page
    >> > that will be run in another folder. The real question is *how* do I do
    >> > this?
    >> > How can I have a login form in another app authenticate the first
    >> > application?
    >> >
    >> > Bruce
    >> >
    >> > "Joseph MCAD" wrote:
    >> >
    >> >> April 8, 2005
    >> >>
    >> >> If the forms are in seperate folders which are configured to be
    >> >> virtual
    >> >> directories, then you will be prompted to sign in when you browse to
    >> >> each
    >> >> folder. This is because signing in to one application will grant
    >> >> access
    >> >> to
    >> >> that application but browsing to the other folder will cause
    >> >> authentication
    >> >> to be required for that application and folder. I hope you see what I
    >> >> mean.
    >> >> I would check IIS and make sure that the folders are both not virtual
    >> >> directories. HTH
    >> >

    >>
    >>
    >>
    Joseph MCAD, Apr 11, 2005
    #6
    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. sincethe2003

    how to authen AD user in my login page

    sincethe2003, Jul 25, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    320
    Scott Allen
    Jul 25, 2004
  2. Walter W
    Replies:
    0
    Views:
    477
    Walter W
    Jul 22, 2005
  3. Kevin Collins

    Authen::NTLM and MS04-011

    Kevin Collins, Apr 23, 2004, in forum: Perl Misc
    Replies:
    5
    Views:
    226
    Steve
    May 6, 2004
  4. Authen::Smb and routing

    , Oct 25, 2006, in forum: Perl Misc
    Replies:
    1
    Views:
    94
    Martijn Lievaart
    Oct 25, 2006
  5. Replies:
    1
    Views:
    219
    Uwe Kausch
    Mar 11, 2009
Loading...

Share This Page