|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, February 13, 2013 7:58 AM
Points: 137,
Visits: 159
|
|
if the following is in the connection string in an app.config file, the following will use the sql server login and not the windows user login correct?
The following is a connection string that points to a sql server 2008 r2 database. <connectionStrings> <add name="RPCSS_DEVConnectionString" connectionString="Data Source=dev;Initial Catalog=DEV2;User Id=myUsername;Password=myPassword;" providerName="System.Data.SqlClient" /> </connectionStrings> Also can you tell me if there is any way for the windows user name and password to be used when connecting to the sql server 2008 r2 database? If so, can you tell me what the connection sting would be so I know to avoid that connection string?
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 10:24 AM
Points: 6,698,
Visits: 11,724
|
|
wendy elizabeth (2/12/2013) if the following is in the connection string in an app.config file, the following will use the sql server login and not the windows user login correct?
The following is a connection string that points to a sql server 2008 r2 database. <connectionStrings> <add name="RPCSS_DEVConnectionString" connectionString="Data Source=dev;Initial Catalog=DEV2;User Id=myUsername;Password=myPassword;" providerName="System.Data.SqlClient" /> </connectionStrings>
Correct.
Also can you tell me if there is any way for the windows user name and password to be used when connecting to the sql server 2008 r2 database? If so, can you tell me what the connection sting would be so I know to avoid that connection string? Not via the connection string. What you can do is create a new thread under a different security context (lookup WindowsIdentity) and to create the new context you will supply a Windows Account's user and password. Then, on that thread running as the different account you can use a connection string that is setup to use Windows Authentication and it will leverage that user's account to make the connection, not the account that spawned the new thread.
__________________________________________________________________________________________________ There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Believe you can and you're halfway there. --Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, February 13, 2013 7:58 AM
Points: 137,
Visits: 159
|
|
|
|
|