Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

Connecting to database from Web

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lou Civitella - 11 Mar 2008 17:45 GMT
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
sloan - 11 Mar 2008 18:27 GMT
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.

>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
[quoted text clipped - 19 lines]
> Thanks In Advance,
> Lou
Lou Civitella - 11 Mar 2008 19:33 GMT
The Local and Remote Connections is selected and so is Using both TCP/IP and
named pipes.

> First off
>
[quoted text clipped - 42 lines]
>> Thanks In Advance,
>> Lou

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.