Solved

Provide remote SQL server access to local IIS app

Posted on 2011-09-20
4
241 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

895 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now