VWD - Error logiing in to db

S

SAC

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\ASPNET'.]

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

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.
 
T

tian

Two methord
1-
add £§£Î£Ô¡¡£Á£Õ£Ô£È£Ï£Ò£É£Ô£Ù£Ü£Î£Å£Ô£×£Ï£Ò£Ë¡¡£Ó£Å£Ò£Ö£Å£Ò£§in your
system:

¡¡¡¡progress£º
computer£­£¾manage£­£¾local user and group£­£¾group£­£¾double click £Ádministrator£­£¾add£­£¾advanced£­£¾search£­£¾select "£Î£Ô¡¡£Á£Õ£Ô£È£Ï£Ò£É£Ô£Ù£Ü£Î£Å£Ô£×£Ï£Ò£Ë¡¡£Ó£Å£Ò£Ö£Å£Ò" in the
list£­£¾OK
2-
Add a user to your database.
edit your connstring in the web.config.
like this:
connString="server=192.168.0.15;uid=****;pwd=****;database=databasename"
 
S

SAC

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:

<connectionStrings>
<add name="pubsConnectionString1" connectionString="Data
Source=NOTEBOOK\sqlexpress;Initial Catalog=pubs;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="NorthwindConnectionString1" connectionString="Data
Source=NOTEBOOK\sqlexpress;Initial Catalog=Northwind;Integrated
Security=True"
providerName="System.Data.SqlClient" />
<add name="CHConnectionString" connectionString="Data
Source=notebook\sqlexpress;Initial Catalog=CH;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
Please help me by showing how this should be edited.

Thanks.

tian said:
Two methord
1-
add £§£Î£Ô¡¡£Á£Õ£Ô£È£Ï£Ò£É£Ô£Ù£Ü£Î£Å£Ô£×£Ï£Ò£Ë¡¡£Ó£Å£Ò£Ö£Å£Ò£§in your
system:

¡¡¡¡progress£º
computer£­£¾manage£­£¾local user and group£­£¾group£­£¾double click £Ádministrator£­£¾add£­£¾advanced£­£¾search£­£¾select "£Î£Ô¡¡£Á£Õ£Ô£È£Ï£Ò£É£Ô£Ù£Ü£Î£Å£Ô£×£Ï£Ò£Ë¡¡£Ó£Å£Ò£Ö£Å£Ò" in the
list£­£¾OK
2-
Add a user to your database.
edit your connstring in the web.config.
like this:
connString="server=192.168.0.15;uid=****;pwd=****;database=databasename"
SAC said:
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\ASPNET'.]

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

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.
 

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

Forum statistics

Threads
473,772
Messages
2,569,592
Members
45,103
Latest member
VinaykumarnNevatia
Top