PC Review


Reply
Thread Tools Rate Thread

Connecting to database from Web

 
 
Lou Civitella
Guest
Posts: n/a
 
      11th Mar 2008
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

 
Reply With Quote
 
 
 
 
sloan
Guest
Posts: n/a
 
      11th Mar 2008
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.




"Lou Civitella" <(E-Mail Removed)> wrote in message
news:B2E30907-B3A9-4CF5-9E2B-(E-Mail Removed)...
>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



 
Reply With Quote
 
Lou Civitella
Guest
Posts: n/a
 
      11th Mar 2008
The Local and Remote Connections is selected and so is Using both TCP/IP and
named pipes.

"sloan" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> 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.
>
>
>
>
> "Lou Civitella" <(E-Mail Removed)> wrote in message
> news:B2E30907-B3A9-4CF5-9E2B-(E-Mail Removed)...
>>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

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
connecting to remote database without using database links simisantu Webmaster / Programming 0 26th Jul 2007 12:22 AM
connecting to the database =?Utf-8?B?UkJyYWNpbmc=?= Microsoft Access External Data 3 11th May 2005 10:19 PM
Connecting to a database =?Utf-8?B?TXIgQ291cGVy?= Microsoft Outlook Discussion 2 9th Aug 2004 12:43 PM
About connecting to database. Shintaro Microsoft ADO .NET 2 21st Feb 2004 09:27 PM
Connecting in a database Sukist Microsoft Dot NET 2 29th Oct 2003 12:05 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:12 PM.