Change local connection string on remote server

Hello,

I have searched every post and tried every connection string there but can't figure out how to connect to my database on my remote server. I am using Visual Developer 2005 Express Edition in C# and uploading it to a Windows server running asp.net 2.0. The domain has not resolved yet.

I am so new to this and have followed many tutorials step by step but none of them address this issue. They just show how to upload it to the server.

Do I need to use the SQL server provided by my host or can the database stay in the App_Data folder?

My local connection string works locally:

<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\add_newSQL.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />

When I uploaded to my server I changed \SQLEXPRESS to (local) as advised in the forum.

<add name="ConnectionString" connectionString="Data Source=(local);AttachDbFilename=|DataDirectory|\add_newSQL.mdf;Integrated Security=True;User Instance=True"

providerName="System.Data.SqlClient" />

When I debug a page I get the <customErrors mode="Off"/>
error message even thoughtI have already set it in my remote web.config file which may be causing problems itself:

<configuration>

<appSettings/>

<connectionStrings>

<add name="ConnectionString" connectionString="Data Source=(local);AttachDbFilename=|DataDirectory|\add_newSQL.mdf;Integrated Security=True;User Instance=True"

providerName="System.Data.SqlClient" />

</connectionStrings>

<system.web>

<customErrors mode="Off" />

<compilation debug="false" />

<authentication mode="Windows" />

</system.web>

</configuration>

Thanks for any help you can offer. I wish I could find someone to hire to do this part for me or teach me how over the phone. Any suggestions?

June 20th, 2007 1:56am

You are running SQL Express on your development system (your local computer). Are you running SQL Express on the web server?

Thanks,
Bryan

Free Windows Admin Tool Kit Click here and download it now
June 21st, 2007 2:36pm

Having this same, problem!!!!!
June 28th, 2007 12:21am

So the same question to you, as the question wasnt answered by the original poster, are you running SQL Server Express on the WebServer ?

Jens K. Suessmeyer.

---
http://www.sqlserver2005.de
---

Free Windows Admin Tool Kit Click here and download it now
June 29th, 2007 12:19pm

Hi Jens...

I'm having the same problem and yes, I have SQL Express 2005 installed on both my development machine and my web server.

IC Tech

March 28th, 2008 4:49pm

Did you ever get this working? If Yes, can you please let me know.. Thanks..

Free Windows Admin Tool Kit Click here and download it now
April 8th, 2008 7:21pm

Is this still an issue?

Thanks!

January 18th, 2014 8:47pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics