Solved

Provide remote SQL server access to local IIS app

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
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…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

627 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