Professional Web Applications Themes

redirecting to specific webpage after logging in - ASP.NET 2.0 - ASP.NET Security

Hi, I am new to ASP.NET and have been developing a database driven website, which until now has been painless. The one roadblock I am encountering is using the login control. What I would like to do is have a login page where a user enters their login and password and when they authenticate successfully they get redirected in a seperate browser window to their specific website. e.g. user 1 logs in and gets redirected to [url]http://www.domain.com/user1/[/url] user 2 logs in and gets redirected to [url]http://www.domain.com/user2/[/url] I have managed to successfully follow a tutorial [url]http://msdn2.microsoft.com/library/879kf95c.aspx[/url] Can anyone please tell me ...

  1. #1

    Default redirecting to specific webpage after logging in - ASP.NET 2.0

    Hi,

    I am new to ASP.NET and have been developing a database driven website,
    which until now has been painless. The one roadblock I am encountering is
    using the login control.

    What I would like to do is have a login page where a user enters their login
    and password and when they authenticate successfully they get redirected in a
    seperate browser window to their specific website.

    e.g. user 1 logs in and gets redirected to [url]http://www.domain.com/user1/[/url]
    user 2 logs in and gets redirected to [url]http://www.domain.com/user2/[/url]

    I have managed to successfully follow a tutorial
    [url]http://msdn2.microsoft.com/library/879kf95c.aspx[/url]

    Can anyone please tell me if this is possible and how I can achieve this?

    Thank you,

    Devante
    Devante Guest

  2. #2

    Default Re: redirecting to specific webpage after logging in - ASP.NET 2.0

    On Thu, 20 Jan 2005 17:09:04 -0800, "Devante" <Devantediscussions.microsoft.com> wrote:

    Hi,

    I am new to ASP.NET and have been developing a database driven website,
    which until now has been painless. The one roadblock I am encountering is
    using the login control.

    What I would like to do is have a login page where a user enters their login
    and password and when they authenticate successfully they get redirected in a
    seperate browser window to their specific website.

    e.g. user 1 logs in and gets redirected to [url]http://www.domain.com/user1/[/url]
    user 2 logs in and gets redirected to [url]http://www.domain.com/user2/[/url]

    I have managed to successfully follow a tutorial
    [url]http://msdn2.microsoft.com/library/879kf95c.aspx[/url]

    Can anyone please tell me if this is possible and how I can achieve this?


    Where in the login process are you stuck?


    Paul ~~~ [email]pclementameritech.net[/email]
    Microsoft MVP (Visual Basic)
    Paul Clement Guest

  3. #3

    Default Re: redirecting to specific webpage after logging in - ASP.NET 2.0

    Well I am able to have the user login and they get redirected back to the
    default.aspx page saying "You are logged in, Welcome [username]".

    Now here is what I would like to happen:

    User goes to [url]http://domain.com/userlogin/default.aspx[/url] (running ASP.NET 2.0)
    user logins, authenticates succesfully and gets sent to a page which has
    certain personalised information for them but also has a link to enter their
    blog ([url]http://domain.com/dottextweb/user[/url] running ASP.NET 1.1), now they won't
    be administering their own blog though, that gets looked after by me, so they
    don't need to authenticate when entering their own blog. Now I have created
    some additional fields in the AspNetDB in aspnet_users table. Being that I am
    using the AspNetAccessProvider, would it be better to use a SQL DB to store
    all user information? Also, if I stick with the current AspNetAccessProvider,
    how do I have a url (to the blog) come up as a link on the page? How do I
    prevent other users from seeing other users information upon logging in? Is
    it a Select Distinct .... type statement?

    Please bear with me I am still very new to this but learnign so much from
    all the questions and answers I have read on this newsgroup.

    Any help would be greatly appreciated Paul,

    Thank you,

    Devante







    "Paul Clement" wrote:
    > On Thu, 20 Jan 2005 17:09:04 -0800, "Devante" <Devantediscussions.microsoft.com> wrote:
    >
    > ¤ Hi,
    > ¤
    > ¤ I am new to ASP.NET and have been developing a database driven website,
    > ¤ which until now has been painless. The one roadblock I am encountering is
    > ¤ using the login control.
    > ¤
    > ¤ What I would like to do is have a login page where a user enters their login
    > ¤ and password and when they authenticate successfully they get redirected in a
    > ¤ seperate browser window to their specific website.
    > ¤
    > ¤ e.g. user 1 logs in and gets redirected to [url]http://www.domain.com/user1/[/url]
    > ¤ user 2 logs in and gets redirected to [url]http://www.domain.com/user2/[/url]
    > ¤
    > ¤ I have managed to successfully follow a tutorial
    > ¤ [url]http://msdn2.microsoft.com/library/879kf95c.aspx[/url]
    > ¤
    > ¤ Can anyone please tell me if this is possible and how I can achieve this?
    > ¤
    >
    > Where in the login process are you stuck?
    >
    >
    > Paul ~~~ [email]pclementameritech.net[/email]
    > Microsoft MVP (Visual Basic)
    >
    Devante Guest

  4. #4

    Default Re: redirecting to specific webpage after logging in - ASP.NET 2.0

    On Fri, 21 Jan 2005 09:47:04 -0800, "Devante" <Devantediscussions.microsoft.com> wrote:

    Well I am able to have the user login and they get redirected back to the
    default.aspx page saying "You are logged in, Welcome [username]".

    Now here is what I would like to happen:

    User goes to [url]http://domain.com/userlogin/default.aspx[/url] (running ASP.NET 2.0)
    user logins, authenticates succesfully and gets sent to a page which has
    certain personalised information for them but also has a link to enter their
    blog ([url]http://domain.com/dottextweb/user[/url] running ASP.NET 1.1), now they won't
    be administering their own blog though, that gets looked after by me, so they
    don't need to authenticate when entering their own blog. Now I have created
    some additional fields in the AspNetDB in aspnet_users table. Being that I am
    using the AspNetAccessProvider, would it be better to use a SQL DB to store
    all user information? Also, if I stick with the current AspNetAccessProvider,
    how do I have a url (to the blog) come up as a link on the page? How do I
    prevent other users from seeing other users information upon logging in? Is
    it a Select Distinct .... type statement?


    You can use role-based security with Forms authentication, but you will probably need to define the
    roles for each of your users in the database so that you can retrieve and assign them when a user
    logs in. The following MS KB article should get you started:

    How To Implement Role-Based Security with Forms-Based Authentication in Your ASP.NET Application by
    Using Visual Basic .NET
    [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;Q306238[/url]

    Here is some additional info concerning Forms authentication and SQL Server:

    How To Use Forms Authentication with SQL Server 2000
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secmod/html/secmod17.asp[/url]


    Paul ~~~ [email]pclementameritech.net[/email]
    Microsoft MVP (Visual Basic)
    Paul Clement Guest

Similar Threads

  1. Replies: 0
    Last Post: July 29th, 12:26 PM
  2. #24788 [Fbk->Opn]: CGI Application crashes obviously when redirecting webpage
    By christoph at chcnet dot net in forum PHP Development
    Replies: 1
    Last Post: July 24th, 11:52 AM
  3. #24788 [Opn]: CGI Application crashes obviously when redirecting webpage
    By christoph at chcnet dot net in forum PHP Development
    Replies: 0
    Last Post: July 24th, 10:33 AM
  4. Replies: 0
    Last Post: July 24th, 09:38 AM
  5. Replies: 0
    Last Post: July 24th, 08:27 AM

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