?
Solved

SQL Connection String

Posted on 2013-06-25
6
Medium Priority
?
383 Views
Last Modified: 2013-06-25
Hi Experts I have have a MS SQL Server running on one of my home network, however i want to put an ASP.Net website on the web and connect to the database however i cant get the connection string to work and i have both ports 1433 and 1521 open and forward to the relevent machine.

my Computer Name is SQLServer-PC with Windows Authentication and would be grateful if you could give me some help.

thanks

Simon
0
Comment
Question by:SimonPrice33
[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
6 Comments
 
LVL 16

Expert Comment

by:Surendra Nath
ID: 39275607
it is very difficult to suggest what is going over there, without actually seeing the connection string itself..

At times like this I visit the below website and validate my connection string...
http://www.connectionstrings.com/

it has connection strings for all databases and all sorts of drivers... this might be of some help..

if it does not then, please post the connection string and also the error that you are getting.
0
 

Author Comment

by:SimonPrice33
ID: 39275705
ive tried this site before but it didnt work

<add name="ExtDatabase" connectionString="Data Source=tcp:xx.xx.xx.xxx;Database=WeddingList;User Id=SQLServer-PC\Simon;Password=xxxxxx;" providerName="System.Data.SqlClient" />

the internal connection works but it doesnt need to go through my router and be port forwarded
0
 

Author Comment

by:SimonPrice33
ID: 39275765
the closest on the site that would match what im after is

Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;
User ID=myUsername;Password=myPassword;

but its not getting through
0
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
LVL 13

Accepted Solution

by:
haloexpertsexchange earned 1000 total points
ID: 39275779
The first one pretty much matches what our site is using.
  <add name="xxxxxx" connectionString="Data Source=xxxxxx;Initial Catalog=xxxxx;User ID=xxxxx;Password=xxxxx;Connection Timeout=60;Max Pool Size=500;"
   providerName="System.Data.SqlClient" />
0
 
LVL 18

Assisted Solution

by:Jerry Miller
Jerry Miller earned 1000 total points
ID: 39275784
Here is one that I use that works.

<add name="ConnectionString_dev" connectionString="Data Source=serverName;Initial Catalog=DatabaseName;Persist Security Info=True;User ID=web_ID;Password=webPassword;Connection timeout=60" providerName="System.Data.SqlClient"/>

Make sure that you can connect through SQL Management using the same user name and password.
0
 

Author Closing Comment

by:SimonPrice33
ID: 39275852
Thank you guys... it was a combination of the two plus another bit that worked...

plus i went for SQL Server Authentication too

 <add name="IntDatabase" connectionString="Data Source=IPADDRESS;Initial Catalog=WeddingList;Persist Security Info=True;User ID=sa;Password=xxxxxxxx" providerName="System.Data.SqlClient" />
0

Featured Post

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
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
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Suggested Courses

770 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