Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > it's THREE times that i post Really wanna solve this!!!!!

Reply
Thread Tools

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

 
 
micky
Guest
Posts: n/a
 
      12-14-2005
================================================== =========
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~~








 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      12-14-2005
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.

"micky" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> ================================================== =========
> 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~~
>
>
>
>
>
>
>
>



 
Reply With Quote
 
 
 
 
Rob Schieber
Guest
Posts: n/a
 
      12-14-2005
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




--
-
 
Reply With Quote
 
micky
Guest
Posts: n/a
 
      12-14-2005
hi, Kevin!
you make me happy~lol~


"Kevin Spencer" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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.
>
> "micky" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> ================================================== =========
>> 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~~
>>
>>
>>
>>
>>
>>
>>
>>

>
>



 
Reply With Quote
 
micky
Guest
Posts: n/a
 
      12-14-2005
how??

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

"Rob Schieber" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>
>
>
>
> --
> -



 
Reply With Quote
 
Robbe Morris [C# MVP]
Guest
Posts: n/a
 
      12-14-2005
This could also be because you set your account to have
a default database other than master. Then, took your
default database offline.

As a bit of a goofball sometimes, I did this once.

--
Robbe Morris - 2004/2005 Microsoft MVP C#
http://www.eggheadcafe.com/forums/merit.asp





"micky" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> how??
>
> how can i get to grant permissions on my database??
> could you tell me in detail?
>
> "Rob Schieber" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> 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
>>
>>
>>
>>
>> --
>> -

>
>



 
Reply With Quote
 
Karl Seguin
Guest
Posts: n/a
 
      12-14-2005
Agreed, the only time I intentially read an answered post is when Kevin was
the author

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!



"micky" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> hi, Kevin!
> you make me happy~lol~
>
>
> "Kevin Spencer" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>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.
>>
>> "micky" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> ================================================== =========
>>> 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~~
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      12-15-2005
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.

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:(E-Mail Removed)...
> Agreed, the only time I intentially read an answered post is when Kevin
> was the author
>
> Karl
>
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
> http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!
>
>
>
> "micky" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> hi, Kevin!
>> you make me happy~lol~
>>
>>
>> "Kevin Spencer" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>>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.
>>>
>>> "micky" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> ================================================== =========
>>>> 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~~
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
enricoe
Guest
Posts: n/a
 
      12-15-2005
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.

 
Reply With Quote
 
Damien
Guest
Posts: n/a
 
      12-15-2005
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" />
>

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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I really wanna tell you something Markus C++ 0 12-17-2011 10:11 AM
Re: Three Mobile --> Skype on three (Non-three [Symbian - Nokia] handsets) Harry Stottle UK VOIP 0 01-05-2010 08:59 AM
How to solve a three-element equation set? purple Python 2 03-19-2008 07:43 PM
Post Your Three Favorite Movies - I Post Facts About You The Magnficent Bastard Digital Photography 249 01-11-2004 03:46 PM
I'm sorry for post same message three times by mistalke! walker C Programming 1 11-24-2003 08:51 PM



Advertisments