 |
| Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

January 24th, 2005, 02:43 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
|
|
Put another way, for emphasis, "localhost" in:
SqlConnection myConnection = new SqlConnection("server=(local);" +
"database=pubs;Trusted_Connection=Yes");
and in:
http://localhost/mywebsite
don't mean the same thing.
In the first case "localhost" means "database server". In the second case, "localhost" means "web server".
At least that appears to be the case. Suspicion is that the upgraded Windows Firewall in XP SP2 is blocking communication between "localhost" (local instance of IIS) and "localhost" (local instance of SQL Server).
Bob
|
|

January 24th, 2005, 02:44 AM
|
|
Authorized User
|
|
Join Date: Aug 2004
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks :)
It makes a feeling that you are having a study on this rather than having any problem solved. Good:).
Normally I never looks on the very reason of each problem. Just gets it solved.
I expect you to post all you finding on this after you have reached its supremacy.
Thanks once again.
Shibu Narayanan
Software Associates
|
|

January 24th, 2005, 02:45 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
|
|
Oops...I meant:
"server=localhost", not "server=(local)
in my last post.
|
|

January 24th, 2005, 02:53 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
|
|
:) That's probably good advice, Shibu - don't ask why, ask how. Seem's thats how I live the rest of my life, where the answer to my deepest questions is that my deepest questions don't have answers. ;)
Best,
Bob
|
|

January 24th, 2005, 03:18 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Personally, I think the Why is just as important as the How.
The How fixes your current problem, while the Why may provide answers to future questions / problems you may get... ;)
Anyway, I got curious and did a quick test by enabling the Windows firewall (I normally have it turned off because I am using another firewall). However, I can't seem to reproduce the problem. localhost works just as fine as (loca) or MyMachineName.
When I have the time to reboot, I'll see if that makes a difference.
Intriguing problem.....
Imar
|
|

January 24th, 2005, 03:43 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
One more thing: what happens when you open the Client Network Utility from the Sql Server Start Menu?
Do you have, besides Named Pipes, TCP/IP installed?
When you use localhost to be translated to 127.0.0.1, you're using TCP/IP and therefore connect to the database using TCP/IP.
Maybe before SP2, Windows did an implicit conversion from TCP to Named Pipes.
I don't really have an idea what I am talking about, so consider this as a wild guess.... ;)
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Venice Queen by Red Hot Chili Peppers (Track 16 from the album: By The Way) What's This?
|
|

January 30th, 2005, 11:00 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
|
|
Hi Imar,
Thanks for the reply. I got distracted by a few other things and forgot about my thorny little problem for a few days. I did check the Client Network Utility and wasn't surprised to find TCP/IP alive and well. At this point I'm resigned to typing (local) instead of localhost for the remainder of my days (or until the next service pack, whichever comes first). Just being a little tongue in cheek about settling for the HOW side of things. I always push for the WHY as well, but seem to have hit the wall on this one.
- Bob
|
|

September 4th, 2007, 02:37 PM
|
|
Registered User
|
|
Join Date: Sep 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I just seemed to resolve this problem. Can you ensure that if you open up SQL Server Configuration Manager, you've got TCP/IP Enabled under within "SQL Server 2005 Network Configuration" >> "Protocols for MSSQLServer"?
I had tried everything including opening 1433 and 1434 on the firewall. I then tried my pc's host name. It worked fine. I went back to localhost and did some more testing.
After reading this thread, I enabled TCP/IP (which seems to be disabled by default) in SQL 2005 Express. It worked! I then removed both ports from the Firewall, to see if it was a mix of things. It's still working. It appears that simply enabling TCP/IP fixed the problem!
|
|
 |