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

From: Paul Clement (UseAdddressAtEndofMessage_at_swspectrum.com)
Date: 01/24/05


Date: Mon, 24 Jan 2005 08:06:05 -0600

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 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 ~~~ pclement@ameritech.net
Microsoft MVP (Visual Basic)



Relevant Pages

  • Re: IIS on server 2000
    ... Windows Authentication, then the webserver never has the user's password, so ... it can't use that to login to SQL Server on the user's behalf. ... Is there a setting in IIS to pass the user login ...
    (microsoft.public.inetserver.iis.security)
  • ssh login record problem
    ... Allowed Authentication: Public key & Password. ... The problem here is when an user login thru password authentication ... root ssh:notty Fri Sep 3 10:01 (wrong entries of user who had ...
    (comp.security.ssh)
  • Re: Authentication problem
    ... Does the user login to that particular domain as well? ... Internet option - select local intranet, ... If a user's IE6 browser security options> for User Authentication are set such that the "Automatic> logon only in Intranet zone" is chosen, the user is still> prompted to authenticate. ... The login prompt should not> appear. ...
    (microsoft.public.inetserver.iis.security)
  • cookies/forms authentication
    ... Currently I manage user login for our intranet through session variables. ... am in the process of converting this to forms authentication using a sql2000 ... for EDI purposes and can't accept cookies. ... As of now there are only 3 individuals who's browsers wont accept cookies. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ASP.NET Forms Authentication dont work on some Window XP
    ... And at one point if I tried to access the site from the server ... I am working on ASP.NET project where I am using form authentication, ... noticed that after the user login, the authentication cookie was created, ... I need to use Custom Authentication cookie. ...
    (microsoft.public.dotnet.framework.aspnet.security)