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

D

Devante

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 http://www.domain.com/user1/
user 2 logs in and gets redirected to http://www.domain.com/user2/

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

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

Thank you,

Devante
 
P

Paul Clement

¤ 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 http://www.domain.com/user1/
¤ user 2 logs in and gets redirected to http://www.domain.com/user2/
¤
¤ I have managed to successfully follow a tutorial @
¤ http://msdn2.microsoft.com/library/879kf95c.aspx
¤
¤ Can anyone please tell me if this is possible and how I can achieve this?
¤

Where in the login process are you stuck?


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
D

Devante

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 http://domain.com/userlogin/default.aspx (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 (http://domain.com/dottextweb/user 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
 
P

Paul Clement

¤ 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 http://domain.com/userlogin/default.aspx (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 (http://domain.com/dottextweb/user 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
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q306238

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

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


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top