Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 22nd, 2008, 05:33 PM
Authorized User
 
Join Date: Jan 2005
Location: TX USA.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help! DB Connection Failing. Can't Develop!

Hello,
I have been developing a fairly simple website for several weeks now. It connects to one database hosted by CT. I have been making use of both Sql and Object data sources. The last thing I did to the project was publish a working, updated version to our CT hosted domain. Suddenly, my local development environment gets an SqlException every time it tries to connect to the database. I haven't changed anything since publishing, and the published version still works fine. I am still able to connect to the database through Management Studio Express and through Visual Studio. If I use the Configuration wizard for an SqlData source, and get to the last page where it lets me test the Select statement, it works perfectly too. But the connection fails when running the pages through Visual Studio or on IIS.

So I know the problem is not my connection string, it is not a syntax error because all pages were effected simultaneously, and it's not the SQL server because the published version is still connecting.

I haven't been able to develop for 2 days because of this and the deadline's approaching, please help!
  #2 (permalink)  
Old February 22nd, 2008, 06:53 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

By "connection fails" what do you mean? Is an exception thrown? Is there simply no data returned?

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========
  #3 (permalink)  
Old February 22nd, 2008, 09:17 PM
Authorized User
 
Join Date: Jan 2005
Location: TX USA.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

An SqlException is thrown with this 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

  #4 (permalink)  
Old February 22nd, 2008, 10:55 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Chances are CT has set up a Firewall between the internet and the SQL servers and are only allowing certain IP's through said firewall. Contact them and see if this is the case. One thing to note is that unless you are paying for a static IP address through your ISP you are probably not going to be able to touch your production database from your dev system. Since you would have a dynamic IP address that would refresh and possibly change after a given period of time it makes it impossible for CT to whitelist your IP.

hth.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========
  #5 (permalink)  
Old February 23rd, 2008, 12:21 AM
Authorized User
 
Join Date: Jan 2005
Location: TX USA.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'll check on that. I've been developing this way on CT for 2 years so that would suck. If that were the case wouldn't I not be able to connect through Management Studio Express, Visual Studio's server explorer, and visual studio's web forms designer?

  #6 (permalink)  
Old February 23rd, 2008, 12:22 AM
Authorized User
 
Join Date: Jan 2005
Location: TX USA.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is it possible that my IIS and Visual Studio web server are using the wrong port for the connection?

  #7 (permalink)  
Old February 29th, 2008, 04:53 PM
Authorized User
 
Join Date: Jan 2005
Location: TX USA.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have verified that a software update for the web monitoring tool Covenant Eyes from version 4.2.6b to 4.2.7 has caused this problem. I am contacting tech support with the company about it.

  #8 (permalink)  
Old February 29th, 2008, 06:24 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Sorry, I lost track of this thread. Glad you got an answer to your problem though! =]

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========
 


Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
db connection dfeuerborn VB Databases Basics 1 August 19th, 2005 02:08 PM
db connection dfeuerborn Excel VBA 1 August 19th, 2005 02:24 AM
db connection dfeuerborn Access VBA 1 August 17th, 2005 10:33 AM
If any one knows How to develop ole db anjicafe Visual C++ 0 June 15th, 2005 09:01 PM
DB Connection stu9820 ASP.NET 1.0 and 1.1 Basics 1 September 26th, 2004 09:01 PM



All times are GMT -4. The time now is 05:53 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.