Re: it's THREE times that i post Really wanna solve this!!!!!



micky wrote:
===========================================================
 Cannot open user default database. Login failed.
 Login failed for user 'NT AUTHORITY\SYSTEM'.
 ============================================================

my website consist of three wesite in a solution.

Solution(http://localhost/solution/)
-App_Data/db.mdf
-a(http://localhost/solution/a/)
-b(http://localhost/solution/b/)
-c(http://localhost/solution/c/)

a,b,c sites are using db.mdf file in app_data folder of solution project
so i made connection string like below.

<add name="ConnectionString" connectionString="Data
Source=.\SQLExpress;Integrated Security=True;User
Instance=True;AttachDBFilename=C:\Inetpub\wwwroot\Solution\App_Data\db.mdf"
      providerName="System.Data.SqlClient" />

the problem is ...
open a,b or c website and then i also open vs2005 to modify database
error occur to me...like Unc share...

in opposite , it will be same result ...

help me~~


Since you are using Integrated Security, that means that the identity of the caller is assumed, in most cases this is the ASPNet account, you need to grant permissions on your database to this account.

--
Rob Schieber




-- ÿþ- .



Relevant Pages

  • asp.net nt account and connection string
    ... connection string in my webconfig file containing the user account and ... I use to connect to my database AND the ASPNET account that has its own ... If I connect to the database using administrator account in my connection ...
    (microsoft.public.dotnet.security)
  • Re: its THREE times that i post Really wanna solve this!!!!!
    ... > Cannot open user default database. ... > my website consist of three wesite in a solution. ... advise against having database files anywhere under the IIS ...
    (microsoft.public.dotnet.framework.aspnet)
  • Redirecting to HTTPS page from VS2005 debugger fails
    ... That works okay when I run it from a browser, but when I want to debug it ... Cannot open user default database. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ASP.NET Website Project
    ... "If your connection string is using integrated authentication, ... ASPNET account in the database is already assigned enough permission to ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: its THREE times that i post Really wanna solve this!!!!!
    ... >> Cannot open user default database. ... > the caller is assumed, in most cases this is the ASPNet account, you need ... > to grant permissions on your database to this account. ...
    (microsoft.public.dotnet.framework.aspnet)

Loading