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

M

micky

===========================================================
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~~
 
K

Kevin Spencer

I *read* this post three times and still didn't understand the question...

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.
 
R

Rob Schieber

micky said:
===========================================================
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.
 
M

micky

hi, Kevin!
you make me happy~lol~


Kevin Spencer said:
I *read* this post three times and still didn't understand the question...

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.
 
M

micky

how??

how can i get to grant permissions on my database??
could you tell me in detail?
 
K

Karl Seguin

Agreed, the only time I intentially read an answered post is when Kevin was
the author :)

Karl
 
K

Kevin Spencer

Very funny, Karl.

I seem to have trouble understanding things that other people find easy to
understand. However, once I understand the problem, I can often help. So, I
ask. Why do I have trouble understanding these things? I dunno. I suppose
we're all idiot savants of one sort or another.

--

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.
 
E

enricoe

So..

When you use only the site there's no error ? And if you open only
Visual Studio all is't ok ?
If the aswer is Yes, visual studio lock the file with a user and the
site lock with a other user.

Attach permanently the DB in sqlexpress, and connect to DB without
AttachDBFilename.
 
D

Damien

micky said:
===========================================================
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" />
Hi micky,

Hope that the others can help you with finding a solution. Just wanted
to check - you've made sure the permissions are set right in IIS to
prevent someone downloading you mdf file, haven't you? I'd normally
advise against having database files anywhere under the IIS
directories.

Damien
 
M

micky

there is no error ..only acess problem...
how can i attach my DB in sqlexpress??
i don't know about sqlexpress in detail..i was looking for some menu of sql
startup menu..
such as SQL Server Configuration Manager and SQL Server Surface Area
Configuration
but i didn't find it where is it?you mean alias??
 
M

micky

i might think app_data folder in asp.net 2.0 will protect to downlod mdf
file by someone
isn't it right?
 
D

Damien

micky said:
i might think app_data folder in asp.net 2.0 will protect to downlod mdf
file by someone
isn't it right?
Ah, yes. To be honest, I'm still not up to speed on 2.0 - so my
immediate concern was unfounded. I've just always felt nervous storing
data under the IIS directories since I was handed a site where you
could download the mdf file. My bad.

Damien
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top