bmanmike39
asked on
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=s erversName \XPRESS;ui d=aspuser; pwd=aspuse rPassworkd ;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.
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=s
</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.
ASKER
Tried it, but it gave me this error:
Exception Details: System.Data.SqlClient.SqlE xception: Cannot open database " DATABName " requested by the login. The login failed.
Login failed for user 'aspuser'
Exception Details: System.Data.SqlClient.SqlE
Login failed for user 'aspuser'
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.
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.
ASKER
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=s erversName \XPRESS;ui d=aspuser; pwd=aspuse rPassworkd ;database= DATABName" />
</connectionStrings>
But thanks anyway!
<connectionStrings>
<add name="ConnectionString" connectionString="server=s
</connectionStrings>
But thanks anyway!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<add name="ConnectionString" connectionString="server=s