Setting permissions for Sql Server 2005 for asp user account

How would Set permissions  Sql  Server 2005 so that I can access a  asp page created in VWD and Sql Express.

On the production server i have just the one instance of Sql

I have the following connection string in the web config file:

<connectionStrings>
        <add name="ConnectionString" connectionString="server=serversName\XPRESS;uid=aspuser;pwd=aspuserPassworkd;database=DATABName" />
    </connectionStrings>

The account i setup to access the db in Sql 2005 Proper on the Production serve is Represented by the name in the above example as “aspuser”. I created this user in security, logins. And  I gave permissions to this on the Db level “create procedure  delete, select, update insert.”

I get a error when i run the page in the browser that  says “login failed for aspuser.”

I know virtual directory is configured properly. I can run aspx page in the directory with out a db connection, without and error.

Any help would be greatly appreciated.
bmanmike39Asked:
Who is Participating?
 
GranModCommented:
Closed, 500 points refunded.
GranMod
The Experts Exchange
Community Support Moderator of all Ages
0
 
appariCommented:
try changing the connection string to

<add name="ConnectionString" connectionString="server=serversName\XPRESS;uid=aspuser;pwd=aspuserPassworkd;Trusted_Connection=no;database=DATABName" />

0
 
bmanmike39Author Commented:
Tried it, but it gave me this error:

Exception Details: System.Data.SqlClient.SqlException: Cannot open database " DATABName " requested by the login. The login failed.
Login failed for user 'aspuser'
0
 
appariCommented:
did you map the login aspuser to use the database DATABNAME?
if not try mapping.
in management studio, open the property page of user aspuser.
you will find user mapping, click on that. on the right pane select the databases on which aspuser needs permission. click ok and try again.
0
 
bmanmike39Author Commented:
I got it to work my problem was with my connection string. I thought i just had to name the db in it, but found that i had to give the path where database= C:\path\DATBName.

<connectionStrings>
        <add name="ConnectionString" connectionString="server=serversName\XPRESS;uid=aspuser;pwd=aspuserPassworkd;database=DATABName" />
    </connectionStrings>


But thanks anyway!


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.