Trying to get a simple webpage with SQL 2005 Express to work on my hosted site

M

Martin Randall

Hi,

I'm trying to get a simple dataview test page working on my hosted site. The hosted site runs ASP.Net 2.0, no problem. The test page works on my development machine, no problem... but when I upload the published site I get...

System.Data.SqlClient.SqlException: 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)

Does anyone have any ideas on this?

Martin Randall
 
W

Wayne Wengert

Where is the SQL Server? Is it on a seperate site?
Hi,

I'm trying to get a simple dataview test page working on my hosted site. The hosted site runs ASP.Net 2.0, no problem. The test page works on my development machine, no problem... but when I upload the published site I get...

System.Data.SqlClient.SqlException: 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)

Does anyone have any ideas on this?

Martin Randall
 
M

Martin Randall

Ah - sorry. The Sql Server 2005 Express file is in the App_Data folder
Where is the SQL Server? Is it on a seperate site?
Hi,

I'm trying to get a simple dataview test page working on my hosted site. The hosted site runs ASP.Net 2.0, no problem. The test page works on my development machine, no problem... but when I upload the published site I get...

System.Data.SqlClient.SqlException: 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)

Does anyone have any ideas on this?

Martin Randall
 
K

Kevin Spencer

Bad Connection string or a bad SQL Server configuration.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

Hi,

I'm trying to get a simple dataview test page working on my hosted site. The
hosted site runs ASP.Net 2.0, no problem. The test page works on my
development machine, no problem... but when I upload the published site I
get...

System.Data.SqlClient.SqlException: 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)

Does anyone have any ideas on this?

Martin Randall
 
M

Martin Randall

Hmm... thought of those already. Any other ideas? Could it be that my
hosting company has badly configured SQL Express?
 
J

Juan T. Llibre

M

Martin Randall

Hi - thanks for the pointer, but I'm not sure if that is relevent. Is it
something that my hosting company will have to sort out?
 
J

Juan T. Llibre

re:
I'm not sure if that is relevent.

Let me say it another way :

If the networking protocols are not enabled,
*nobody* can connect to SQL Server Expres from outside the bix SSE is running in.

Is that clearer now ?
Did you read the information in the links I provided for you ?

re:
Is it something that my hosting company will have to sort out?

YEs. They have to enable SSE's networking protocols,
by following the instructions in the articles I sent you.

Request that they do that, and send them the article.
They might not be aware of what they have to do ( as apperently thay aren't ).
 
D

durayakar

No it is not clear...

Having a similar issue, let me re-state the question to be more clear
on my end...

I have developed and ASP.NET 2.0 Site in visual Studio 2005. I set up
the security, defined roles e.t.c.
I did not set-up any SQL server, including the SQL server Express on my
development box.
ASP.NET 2.0 created this MDF file in the APP_Data folder for me and
took care of the connection.
This default connection string is not even visible in the config file.

I did not do any settings AT ALL, including network protocols, SQL
server express settings whatsoever...

Then I PUBLISHed this site to my hosted server.

and I am getting this very same error

Isn't it supposed to work ?

My hosted site supports asp.net 2.0

Do I nned anything other than that?

Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top