Solved

Provide remote SQL server access to local IIS app

Posted on 2011-09-20
4
243 Views
Last Modified: 2012-05-12
I have a couple WindowsServer08 R2 (both running same IIS/SQL versions) within my VPN. I'm looking for a connection string that will access the db on the other machine. I have the connection working via MSSMS but not via IIS.

I'm editing my web.config's db connection property to point at the remote sql server expecting that if i use the same 'computerName' property that I see from MSSMS my web app should gain access.

Here's the connectionString's properties - should I be including other properties to ensure I connect the same way MSSMS is connecting?

<add name="dbConnection" connectionString="
	Data Source=myRemoteName\SQLEXPRESS;
	Initial Catalog=myDb;
	Persist Security Info=True;
	User ID=foo;
	Password=bar
" />

Open in new window


0
Comment
Question by:juststeve
4 Comments
 
LVL 13

Expert Comment

by:itgroove
ID: 36571477
Hey there,
I'm not a SQL Connection string expert but I've found I don't need to be with this website: http://www.connectionstrings.com/

Basically, pick the technology from the page and it will help you form your connection string.
Hope it helps.
0
 
LVL 20

Accepted Solution

by:
Marten Rune earned 250 total points
ID: 36571822
is MSSMS = SSMS i e SQL Server Management Studio?

If so is it this connection thats working, then it can utilize for example named pipes.

try to add tcp: in your connectionstring in SSMS, it will pinpoint if TCP is working, or if SSMS is using named pipes and you didn't know it.

like:
tcp:NameOfTheServer\sqlexpress

Regards Marten
0
 
LVL 21

Expert Comment

by:Alpesh Patel
ID: 36573075
Please give premissions to IIS use for SQL Server.
0
 

Author Closing Comment

by:juststeve
ID: 36948236
thx
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have a large data set and a SSIS package. How can I load this file in multi threading?
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question