Link to home
Start Free TrialLog in
Avatar of StewSupport
StewSupport

asked on

application role sql 2008

ok so i logged into sql as admin and did the following
CREATE APPLICATION ROLE test
    WITH PASSWORD = 'test'
    , DEFAULT_SCHEMA = test;
GO


exec sp_setapprole test, 'test'


now in my web.config, what should my connection string look like for my asp.net web application?
<add name="testconnectionstring" connectionString="Data Source=testdb;Initial Catalog=testcatalog;Persist Security Info=True;User ID=test;Password=test; Connect Timeout=360" providerName="System.Data.SqlClient" />
Avatar of BuggyCoder
BuggyCoder
Flag of India image

data source should be DBServerName\InstanceName
InitialCatalog should be databasename
<add name="testconnectionstring" connectionString="Data Source=Database\Instance; Initial Catalog=testdb;Persist Security Info=True;User ID=test;Password=test; Connect Timeout=360" providerName="System.Data.SqlClient" />

Open in new window

Avatar of StewSupport
StewSupport

ASKER

yes i got that but it doesn't see the login info because i'm using the login info as application role info. what login info should i use
you have to create a user with username test and password test.
Role has nothing to do in connection string, its purely as SQL Identity....
so then how do i assign this user to that application role
ASKER CERTIFIED SOLUTION
Avatar of BuggyCoder
BuggyCoder
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial