Remote Connect Error (1 Viewer)

KenHigg

Registered User
Local time
Today, 00:45
Joined
Jun 9, 2004
Messages
13,327
I need some help getting my head around this...

I am trying to do a new asp.net 2 site to learn the stuff. I have a host with . asp.net 2.0 framework, etc. I have VWD express on my local machine and do up a test page on the hosted site. There, I also do a .mdf in the App_Data folder with a simple table. Then I do a test page and put a data source control and a grid view control on the page that points to the that .mdf and save it. But when I run it it gives me the following error:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

So..... What I thinking is that since it is bad juju to have the .mdf on the same box as the web page, the hosting people doesn't want anyone to run them there. So... Will I have to have to get them to set up a sql database (where ever they want to set it up, on a dedicated sql box I assume?) and then find it when I do the datasource control?

Thanks for any light anyone may be able to shed on this... :)
 

Kodo

"The Shoe"
Local time
Today, 00:45
Joined
Jan 20, 2004
Messages
707
Acutally, using the DB in the APP_DATA folder is using what is called a user instance and is typically not the way we do it in the web world. Aside from that, it requires SQL Server 2005 express as the + versions don't support this. Now, I agree with the bad juju theory that it's good practice to separate the two and your hosting provider may already have this set up. Just ask them if your account level has support for SQL server and they should (hopefully) provide you with proper administrative functionality.

From that point, you can modify your connection string to use the sql server remotely.
 

KenHigg

Registered User
Local time
Today, 00:45
Joined
Jun 9, 2004
Messages
13,327
Thanks for the response Kodo - I'm still tinkering with this. I suspected that all I may have to do is to re-point the connection string to a proper sql source instead of in the 'user instance' ;) .mdf in the app_data folder...
 

Kodo

"The Shoe"
Local time
Today, 00:45
Joined
Jan 20, 2004
Messages
707
Thanks for the response Kodo - I'm still tinkering with this. I suspected that all I may have to do is to re-point the connection string to a proper sql source instead of in the 'user instance' ;) .mdf in the app_data folder...

That would be my suggestion as well :) .. good chance it will work for you after you do so :D
 

Users who are viewing this thread

Top Bottom