Solved

Provide remote SQL server access to local IIS app

Posted on 2011-09-20
4
247 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

734 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