modifying aspnetdb

R

R.A.M.

Hello,
I am learning ASP.NET. In web application I am programming now I decided to
add a table "Users" to aspnetdb database (with extra data about users) and a
trigger AFTER UPDATE of "aspnet_Users" table. But now I cannot run my
application because of error in line:
MembershipUser mu = Membership.GetUser();
System.Data.SqlClient.SqlException: Cannot open user default database. Login
failed.
Login failed for user 'PC\ASPNET'.
A few months ago in another application I modified aspnetdb and (as I
rememeber) there was no problem.
Do you know something about modifying asnetdb database?
/RAM/
 
D

dgk

Hello,
I am learning ASP.NET. In web application I am programming now I decided to
add a table "Users" to aspnetdb database (with extra data about users) and a
trigger AFTER UPDATE of "aspnet_Users" table. But now I cannot run my
application because of error in line:
MembershipUser mu = Membership.GetUser();
System.Data.SqlClient.SqlException: Cannot open user default database. Login
failed.
Login failed for user 'PC\ASPNET'.
A few months ago in another application I modified aspnetdb and (as I
rememeber) there was no problem.
Do you know something about modifying asnetdb database?
/RAM/

Don't know. But usually additional user data is put into the user
profile and you don't need to create your own table.
 
M

Mark Fitzpatrick

This is an error in the connectionstring that is used to connect to the
database that holds the aspnet membership system. Your connection string is
using a trusted account. This means that the current user context that the
page is running under is the one used to connect to the database. In this
case, it's the ASPNET user account. This is not an account that has access
to the database normally which is why you receive this error. You either
need to go into SQL Server itself and grant this user privaleges, or use a
named SQL server login and pass that username and password in the
connectionstring (and set trusted to false).
 

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,777
Messages
2,569,604
Members
45,222
Latest member
patricajohnson51

Latest Threads

Top