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).
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"R.A.M." <r_********@poczta.onet.plwrote in message
news:em**********@news.onet.pl...
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/