Ask a Question related to ASP.NET Security, Design and Development.
-
Devante #1
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
-
#24788 [Fbk->NoF]: CGI Application crashes obviously when redirecting webpage
ID: 24788 Updated by: sniper@php.net Reported By: christoph at chcnet dot net -Status: Feedback +Status: ... -
#24788 [Fbk->Opn]: CGI Application crashes obviously when redirecting webpage
ID: 24788 User updated by: christoph at chcnet dot net Reported By: christoph at chcnet dot net -Status: Feedback... -
#24788 [Fbk]: CGI Application crashes obviously when redirecting webpage
ID: 24788 Updated by: sniper@php.net Reported By: christoph at chcnet dot net Status: Feedback -Bug Type: ... -
#24788 [Bgs->Fbk]: CGI Application crashes obviously when redirecting webpage
ID: 24788 Updated by: helly@php.net Reported By: christoph at chcnet dot net -Status: Bogus +Status: ... -
#24788 [NEW]: CGI Application crashes obviously when redirecting webpage
From: christoph at chcnet dot net Operating system: win2k advanced server PHP version: 4.3.2 PHP Bug Type: Reproducible crash... -
Paul Clement #2
Re: redirecting to specific webpage after logging in - ASP.NET 2.0
On Thu, 20 Jan 2005 17:09:04 -0800, "Devante" <Devante@discussions.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]pclement@ameritech.net[/email]
Microsoft MVP (Visual Basic)
Paul Clement Guest
-
Devante #3
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" <Devante@discussions.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]pclement@ameritech.net[/email]
> Microsoft MVP (Visual Basic)
>Devante Guest
-
Paul Clement #4
Re: redirecting to specific webpage after logging in - ASP.NET 2.0
On Fri, 21 Jan 2005 09:47:04 -0800, "Devante" <Devante@discussions.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]pclement@ameritech.net[/email]
Microsoft MVP (Visual Basic)
Paul Clement Guest



Reply With Quote

