Connecting to database from Web

L

Lou Civitella

I created a test web site with VS2008 using Framework 2.0. Created a
database in SQL Server 2005 and am able to connect to it without any
problems. I then setup the database to be accessed using a public IP
address. Changed the connection string in my web site to use the public IP
along with the port, when I load the web site through VS2008 everything
works OK. When I try to upload to my web site I get this error message.

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: TCP Provider, error: 0 - A connection attempt failed because the
connected party did not properly respond after a period of time, or
established connection failed because connected host has failed to respond.)

I added the SQL Server and Browser to the firewall as well as the port. I
can connect to my database from a remote connection through SQL Server
Management Studio. I only get this when the site loads from my web site.

Any ideas?

Thanks In Advance,
Lou
 
S

sloan

First off

//this failure may be caused by the fact that
under the default settings SQL Server does not allow remote connections.
//

is a message which ~may~ happen, but may not be the culprit.

Its like
"Your car is making a noise, it ~may~ be the brakes".

However, it could be the issue.


There is a "Surface Configuration Tool" under start / programs / Sql Server
2005 /
and there is a place to enable remote connections there.

If its already enabled, then you'll have to check and recheck your
connection string.

Find out about the surface configuration first, then report back..and you'll
get more concrete advice.
 
L

Lou Civitella

The Local and Remote Connections is selected and so is Using both TCP/IP and
named pipes.
 

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,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top