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

Discussion in 'ASP .Net' started by micky, Dec 14, 2005.

  1. micky

    micky Guest

    ===========================================================
    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~~
    micky, Dec 14, 2005
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > ===========================================================
    > 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~~
    >
    >
    >
    >
    >
    >
    >
    >
    Kevin Spencer, Dec 14, 2005
    #2
    1. Advertising

  3. micky

    Rob Schieber Guest

    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




    --
    ÿþ-
    Rob Schieber, Dec 14, 2005
    #3
  4. micky

    micky Guest

    hi, Kevin!
    you make me happy~lol~


    "Kevin Spencer" <> wrote in message
    news:...
    >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" <> wrote in message
    > news:...
    >> ===========================================================
    >> 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~~
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>

    >
    >
    micky, Dec 14, 2005
    #4
  5. micky

    micky Guest

    how??

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

    "Rob Schieber" <> wrote in message
    news:%...
    > 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
    >
    >
    >
    >
    > --
    > ÿþ-
    micky, Dec 14, 2005
    #5
  6. 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" <> wrote in message
    news:...
    > how??
    >
    > how can i get to grant permissions on my database??
    > could you tell me in detail?
    >
    > "Rob Schieber" <> wrote in message
    > news:%...
    >> 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
    >>
    >>
    >>
    >>
    >> --
    >> ÿþ-

    >
    >
    Robbe Morris [C# MVP], Dec 14, 2005
    #6
  7. micky

    Karl Seguin Guest

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

    >>
    >>

    >
    >
    Karl Seguin, Dec 14, 2005
    #7
  8. 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:...
    > 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" <> wrote in message
    > news:...
    >> hi, Kevin!
    >> you make me happy~lol~
    >>
    >>
    >> "Kevin Spencer" <> wrote in message
    >> news:...
    >>>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" <> wrote in message
    >>> news:...
    >>>> ===========================================================
    >>>> 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~~
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
    Kevin Spencer, Dec 15, 2005
    #8
  9. micky

    enricoe Guest

    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.
    enricoe, Dec 15, 2005
    #9
  10. micky

    Damien Guest

    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
    Damien, Dec 15, 2005
    #10
  11. micky

    micky Guest

    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??



    "enricoe" <> wrote in message
    news:...
    > 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.
    >
    micky, Dec 15, 2005
    #11
  12. micky

    micky Guest

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


    "Damien" <> wrote in message
    news:...
    > 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
    >
    micky, Dec 15, 2005
    #12
  13. micky

    Damien Guest

    micky wrote:
    > 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
    Damien, Dec 16, 2005
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Duncan
    Replies:
    1
    Views:
    1,220
    John C. Bollinger
    Nov 17, 2004
  2. Apricot
    Replies:
    4
    Views:
    524
    velthuijsen
    Apr 16, 2004
  3. walker
    Replies:
    1
    Views:
    329
    Keith Thompson
    Nov 24, 2003
  4. purple
    Replies:
    2
    Views:
    300
    Gabriel Genellina
    Mar 19, 2008
  5. Markus
    Replies:
    0
    Views:
    183
    Markus
    Dec 17, 2011
Loading...

Share This Page