VWD - Error logiing in to db

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • SAC

    VWD - Error logiing in to db

    I'm brand new to dotnet...when I press F5 on a webpage with a gridview
    connected to the pubs db, I get an error

    [SqlException (0x80131904): Cannot open database "pubs" requested by the
    login. The login failed.
    Login failed for user 'NOTEBOOK\ASPNE T'.]

    I'm logged into this computer as <DomainName>\Ad ministrator

    I checked the db users and there is none called ASPNET.

    I tried adding it with ownership on the DB and still no prpgress.

    I tried logging into the local computer (NOTEBOOK) rather than the domain.
    but no success.

    Any ideas on what I need to do?

    Thanks.


  • tian

    #2
    Re: VWD - Error logiing in to db

    Two methord
    1-
    add £§£Î£Ô¡¡£Á£Õ£Ô£ ȣϣңɣԣ٣ܣΠ£Å£Ô£×£Ï£Ò£Ë¡¡£ ӣţң֣ţң§in your
    system:

    ¡¡¡¡progress£º
    computer£­£¾man age£­£¾local user and group£­£¾group£ ­£¾double click £Ádministrator£ ­£¾add£­£¾advan ced£­£¾search£­ £¾select "£Î£Ô¡¡£Á£Õ£Ô£È £Ï£Ò£É£Ô£Ù£Ü£Î£ ţԣףϣңˡ¡£Ó £Å£Ò£Ö£Å£Ò" in the
    list£­£¾OK
    2-
    Add a user to your database.
    edit your connstring in the web.config.
    like this:
    connString="ser ver=192.168.0.1 5;uid=****;pwd= ****;database=d atabasename"
    "SAC" <some@microsoft .comдÈëÏûÏ¢
    news:uQjzt4%23b IHA.2688@TK2MSF TNGP06.phx.gbl. ..
    I'm brand new to dotnet...when I press F5 on a webpage with a gridview
    connected to the pubs db, I get an error
    >
    [SqlException (0x80131904): Cannot open database "pubs" requested by the
    login. The login failed.
    Login failed for user 'NOTEBOOK\ASPNE T'.]
    >
    I'm logged into this computer as <DomainName>\Ad ministrator
    >
    I checked the db users and there is none called ASPNET.
    >
    I tried adding it with ownership on the DB and still no prpgress.
    >
    I tried logging into the local computer (NOTEBOOK) rather than the domain.
    but no success.
    >
    Any ideas on what I need to do?
    >
    Thanks.
    >
    >

    Comment

    • SAC

      #3
      Re: VWD - Error logiing in to db

      Thanks so much for your reply.

      I've added the user to the db, but I'm not sure how to edit the connection
      string.

      Here's what I have now:

      <connectionStri ngs>
      <add name="pubsConne ctionString1" connectionStrin g="Data
      Source=NOTEBOOK \sqlexpress;Ini tial Catalog=pubs;In tegrated Security=True"
      providerName="S ystem.Data.SqlC lient" />
      <add name="Northwind ConnectionStrin g1" connectionStrin g="Data
      Source=NOTEBOOK \sqlexpress;Ini tial Catalog=Northwi nd;Integrated
      Security=True"
      providerName="S ystem.Data.SqlC lient" />
      <add name="CHConnect ionString" connectionStrin g="Data
      Source=notebook \sqlexpress;Ini tial Catalog=CH;Inte grated Security=True"
      providerName="S ystem.Data.SqlC lient" />
      </connectionStrin gs>
      Please help me by showing how this should be edited.

      Thanks.

      "tian" <xingyao@yeah.n etwrote in message
      news:F871450A-9B03-4A2C-AFFC-5704621E9FD3@mi crosoft.com...
      Two methord
      1-
      add £§£Î£Ô¡¡£Á£Õ£Ô£ ȣϣңɣԣ٣ܣΠ£Å£Ô£×£Ï£Ò£Ë¡¡£ ӣţң֣ţң§in your
      system:
      >
      ¡¡¡¡progress£º
      computer£­£¾man age£­£¾local user and group£­£¾group£ ­£¾double click £Ádministrator£ ­£¾add£­£¾advan ced£­£¾search£­ £¾select "£Î£Ô¡¡£Á£Õ£Ô£È £Ï£Ò£É£Ô£Ù£Ü£Î£ ţԣףϣңˡ¡£Ó £Å£Ò£Ö£Å£Ò" in the
      list£­£¾OK
      2-
      Add a user to your database.
      edit your connstring in the web.config.
      like this:
      connString="ser ver=192.168.0.1 5;uid=****;pwd= ****;database=d atabasename"
      "SAC" <some@microsoft .comдÈëÏûÏ¢
      news:uQjzt4%23b IHA.2688@TK2MSF TNGP06.phx.gbl. ..
      >I'm brand new to dotnet...when I press F5 on a webpage with a gridview
      >connected to the pubs db, I get an error
      >>
      >[SqlException (0x80131904): Cannot open database "pubs" requested by the
      >login. The login failed.
      >Login failed for user 'NOTEBOOK\ASPNE T'.]
      >>
      >I'm logged into this computer as <DomainName>\Ad ministrator
      >>
      >I checked the db users and there is none called ASPNET.
      >>
      >I tried adding it with ownership on the DB and still no prpgress.
      >>
      >I tried logging into the local computer (NOTEBOOK) rather than the
      >domain. but no success.
      >>
      >Any ideas on what I need to do?
      >>
      >Thanks.
      >>
      >>
      >

      Comment

      Working...