i'm trying to log database activity. therefore i need the user-id of the currently logged-in user.
For the login i used the login-controls that come with VWD and set up a MS SQL Server 2000 Database for data storage. That part works fine, but i've found no way to get the id.
i'd be glad for some hints.
found things linke user.identity.name and membershipuser.providerkey (or sth) - but this didn't help me.
Are you aware of where the users are stored in the database? Did you configure the personalization providers from the default? If not, open up ASPNETDB.MDF and get a feel for how and where user info is stored.
You could get this information by using something like this probably but you would need to pass the value of @UserName in somehow like from a login text box or a drop down list depending on your application
SELECT [UserID] [UserName] FROM [vw_aspnet_Users] WHERE [UserName] = @UserName
Let me know if this helps
hi - thanks a lot. exactly what i needed.
like i said - i'm well aware of the underlying database and its structure - but i'm using a set up MS SQL 2000 instead of the 2005 Express.
Maybe you could help me with a related topic.
I need to built an external Program (think it will be Delphi-built) that can verify users. Due to the Password encryption of asp.net i can't match the username and password without the encryption-algorithm.
I read somewhere about switching off the encryption via the Membership-Provider. But is there no other way without reducing security?
Some of your ideas could help me.
Thanks in advance