Larry Brister
asked on
SQL Server Connection String through a VPN
I have a VPN to a customer.
I can "trick" my SSMS into opening through a command prompt in Windows Authentication mode through that VPN
CMD>C:\Windows\System32\ru nas.exe /netonly /user:gplrinc\my.name "C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\Mana gementStud io\Ssms.ex e"
I am then prompted for a password which I type in and hit "Enter"
SSMS opens... I change to server instance and login
How can I replicate that with a .Net Connection string...
My VPN is open and accessible.
I can "trick" my SSMS into opening through a command prompt in Windows Authentication mode through that VPN
CMD>C:\Windows\System32\ru
I am then prompted for a password which I type in and hit "Enter"
SSMS opens... I change to server instance and login
How can I replicate that with a .Net Connection string...
My VPN is open and accessible.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
tried that using both the "windows" credentials as well as a SQL USer login I created on that SQL Server instanceWhat's the error you got on both tentatives?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hey guys...
LVL 21 ... I had tried that as one of about 30 different permutations and it did not work
This was what wound up working... and it was when I changed to [String] and Database= instead of Catalog
Dim Constring As [String] = "user id=ewUser;password=pwd;Ser ver=server name;Datab ase=theird atabase_"
LVL 21 ... I had tried that as one of about 30 different permutations and it did not work
This was what wound up working... and it was when I changed to [String] and Database= instead of Catalog
Dim Constring As [String] = "user id=ewUser;password=pwd;Ser
ASKER
Shaun Vermaak reminded me to go back to basics and just work through the connection string
And objections to awarding Shaun the points?
And objections to awarding Shaun the points?
Isn't that I said in the first instance?
"You should be able to put the user credentials directly in the connection string so you won't need the runas command."
Only difference is I didn't post any example for the connection string.
"You should be able to put the user credentials directly in the connection string so you won't need the runas command."
Only difference is I didn't post any example for the connection string.
ASKER
Because actual example was posted...
Awarded lions share to Shaun
Awarded lions share to Shaun
ASKER
I tried that using both the "windows" credentials as well as a SQL USer login I created on that SQL Server instance