Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Need to program a connection string for remote access

Reply
Thread Tools

Need to program a connection string for remote access

 
 
AAaron123
Guest
Posts: n/a
 
      10-30-2008
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




 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      10-30-2008
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
>
>
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote access VPNs from remote location to ASA ikkemij@xs4all.nl Cisco 2 07-01-2006 07:18 AM
Microsoft Windows Routing and Remote Access Remote Code Execution Vulnerability imhotep Computer Security 0 06-23-2006 03:47 AM
Microsoft Windows Routing and Remote Access Remote Code Execution Vulnerability imhotep Computer Security 0 06-21-2006 02:03 AM
Remote Access Connection Manager failed to start because NDISWAN c =?Utf-8?B?YXVzdGlucGN0ZWNo?= Wireless Networking 0 11-01-2005 06:31 PM
Remote Assistance fails to connect, remote remote host name could not be resolved Peter Sale Wireless Networking 1 12-11-2004 09:09 PM



Advertisments