473,398 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Need to program a connection string for remote access

This is in my asp.net program running on my local SQL Server 2008 machine:

<add name="Personal" connectionString="Data Source=Dad;Integrated
Security=True;Initial Catalog=Personal"
providerName="System.Data.SqlClient"/>

<add name="LocalSqlServer" connectionString="Data Source=Dad;Integrated
Security=True;Initial Catalog=AspnetDb"/>

This is what I was told to do for my ISP SQL Express 2008 machine:
Copy the mdf and ldf files from your local machine up to the server.
Say I copy them up to my App_Code directory on the ISP machine (is that a
good place to put them?).

How must I change my connection strings?
Thanks in advance for any help!
PS Any way I could have both sets in my file like:

If remote
use these
Otherwise
use these


Oct 30 '08 #1
2 1775
"AAaron123" <aa*******@roadrunner.comwrote in message
news:eJ**************@TK2MSFTNGP06.phx.gbl...
How must I change my connection strings?
I would strongly suggest that you use a Web Deployment Project:
http://weblogs.asp.net/scottgu/archi...-released.aspx

Among many other things, this will allow you to have separate web.config
sections (including connection strings) for your local machine and your
ISP...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 30 '08 #2
no, use the app_data folder, it was designed for this. then in your
connection string you can:

<add name="MYDB" connectionString="Data Source=.\SQLExpress;Integrated
Security=True;User Instance=True;AttachDBFilename=|DataDirectory|mydb .mdf" />

-- bruce (sqlwork.com)
"AAaron123" wrote:
This is in my asp.net program running on my local SQL Server 2008 machine:

<add name="Personal" connectionString="Data Source=Dad;Integrated
Security=True;Initial Catalog=Personal"
providerName="System.Data.SqlClient"/>

<add name="LocalSqlServer" connectionString="Data Source=Dad;Integrated
Security=True;Initial Catalog=AspnetDb"/>

This is what I was told to do for my ISP SQL Express 2008 machine:
Copy the mdf and ldf files from your local machine up to the server.
Say I copy them up to my App_Code directory on the ISP machine (is that a
good place to put them?).

How must I change my connection strings?
Thanks in advance for any help!
PS Any way I could have both sets in my file like:

If remote
use these
Otherwise
use these


Oct 30 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Niyazi | last post by:
Hi, I can connect using my PC local SQL Server Enterprise manager to Remote SQL Server. But I cannot connect using my Connection string? strConn = "Data Source=190.168.0.97,1433;Network...
4
by: GAVO-UK | last post by:
Hello everyone. Using Access 2003 and MSDE I just started experimenting using Access as the front end for SQL using *.adp, and would like to connect the front end to the back end remotely,...
16
by: peshekeedweller | last post by:
Using asp.net 1.1. vb.net 2003. I am trying to connect to a remote sql server 2000 on a virtual machine running windows 2000 server. I can connect through the server explorer in visual studio,...
1
by: vighnesh | last post by:
Hi All I am dealing a project in ASP.NET in which I have to establish a connection to SQL Server 2000 database,where the database was located on a remote system. For this I have used...
1
by: Chris Love | last post by:
I have already asked this, but no one seems to know the answer. Here is the timeline. I wanted to use the membership/roles functionality in a site. I got all sorts of errors trying to get this...
15
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
4
by: glbdev | last post by:
Hi. I am having an problem connecting to a remote SQL Server. Other applications (using access) are connection to it but I cannot get it to work through ASP.Net. Here is my connection string:...
11
by: blunt | last post by:
trying to write a program to write the configuration files for a load of wireless access points. i've never been a good programmer and haven't done any for nearly a decade so have obviously made some...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.