Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 220
  • Last Modified:

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.
0
bmanmike39
Asked:
bmanmike39
  • 2
  • 2
1 Solution
 
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
 
GranModCommented:
Closed, 500 points refunded.
GranMod
The Experts Exchange
Community Support Moderator of all Ages
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now