473,748 Members | 8,530 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem Connecting .NET app to SQL Server

Hi,

I am having a problem connecting my .net applications from the
application server to the database server. When I run the application
from my windows xp (sp2) box it works fine. When I try to connect via
SQL Management Studio to the database server from the application
server I get the same error.

Here is the error:

System.Data.Sql Client.SqlExcep tion: 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)

Here is the Environment:

App Server:

Windows Server 2003 Standard Edition

Inside Company's Firewall/ Network
Database Server:

Windows Server 2000 Advanced Edition

SQL Server 2000 SP4

Remote Connections to the Server is checked

Enable Protocols: Named Pipes & TCP/IP

TCP/IP Port: 1402 (I don't know why it isn't the default of 1433)

The db server is sitting out side the Company's firewall (don't ask me
why). I can access it fine from inside the firewall on my XP box but
not from windows server 2003. There is a web server outside the our
network that also connects to the db server with no problem and that
is running Windows Server 2003 Web Edition.

I can ping the db server from the app server using the IP address.

I tried using the IP address and the port 1402 in my connection string
but that didn't work from any machine (XP and Server).

I imagine the issue is somehow related to the company's firewall but
why would it only block Windows Server 2003 and not XP?

What do I tell the network admin to change?

Any help would be appreciated.

Thanks,

Oran
Apr 3 '08 #1
2 3043
orandov (or*****@gmail. com) writes:
I imagine the issue is somehow related to the company's firewall but
why would it only block Windows Server 2003 and not XP?
Some firewall could be set up to accept the IP address of your XP
box, but not the application server. Apparently, you are able to ping
the db server from the app server, but the firewall on the db server
may not be open to everyone on port 1433. (You said it was on port 1402,
but maybe you looked in the wrong place? The best place to look is
the SQL Server errorlog.) Also check UDP 1434.

Also, when you tried using port 1402 in the connection string, how
did you actually do it?

Not a very conclusive response, but issues like these are difficult to
diagnose on a distance.

--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Apr 3 '08 #2
I let the visual studio dialog build the connection string for me with
the IP Address and now it is working with port 1402.

What I am still puzzled by is that SQL Server Management Studio &
Enterprise Manager (on a Windows Server 2003) can't connect to the
Server with only the server name and it requires the IP Address but on
my XP workstation it works fine with only the server name.

My network admin says there is no difference in the way the Windows
Servers are set up on the network than the XP workstations.

Thank for your help.

Oran
Apr 4 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2546
by: Ali | last post by:
I'm trying to write a really basic chat program that allows 2 client programs to send messages to each other via a server. I've managed to write the code so that both clients can connect to the server and send and recieve messages to/from the server but when I send a message from one client I can't get the message to appear in the second client. I think it's something to do with threads but I don't know what! I've been looking at the...
1
3791
by: Dmitry Akselrod | last post by:
Hello everyone, I have a vb.net application that wraps the TCPListener object in a class. The server connects to the local interface and establishes itself on port 9900. It then polls for pending connections every 500ms. I also have a vb6 application that uses the WinSock control at the other end of the communication tunel. I have to work with vb6 here because it uses less memory than .NET.
12
2789
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed both the iis and sql server in a single machine. Not too long ago, the machine had some hardware problems, and management has decided to purchase new servers, for both asp.net and sql server.
0
1918
by: richard | last post by:
OS: Winxp and Win2003 Visual Basic.NET 2003 MS-SQL Server 2000 hey all I am a newbie in vb.net but i have managed to build a simple chat server in vb.net using socket and a client connecting to it made in vb6. Some of the code in the server are based on the basic samples that i get from other authors. To give you an idea, the server uses sockets,
2
3559
by: John | last post by:
Hi I was working fine with create user wizard and the default membership provider. I have now customised the membership provider as per attached web.config. The create user wizard picks up the custom membership provider fine and removes the security question/answer fields as designated in the custom provider. The problem is that when I try to create a new user in the create user wizard by entering the info and pressing the 'create...
9
2702
by: RvGrah | last post by:
After much hair-pulling, I've finally found the answer to a problem that many are fighting with, difficulty connecting from Sql 2005 Server Management or VS2005 to a remote Sql Server running Sql 2000. In my case the server I couldn't reach was across a vpn connection, behind ISA server 2000, (which had port 1433 open). The answer was in this post:...
0
3921
by: Suresh | last post by:
Hi Guys I have Db2 server installed on remote server. i am connecting to that remote server by using VPN. I want to connect that remote DB2 server instance using my local machine DB2 development client. Bur Its gives me following error message. I searched lots of things on net and tried on remote server but i didnt got suceess. Can any one tell me how to set TCP\IP connection protocol on server for particular instance. Becuase I think
0
2867
by: NoaGross | last post by:
Hi, I'm relly new in java and I have a problem. I'm using java applet. When using http all ok, but when trying to use https i get: Java Plug-in 1.5.0_10 Using JRE version 1.5.0_10 Java HotSpot(TM) Client VM User home directory = C:\Documents and Settings\noa ---------------------------------------------------- c: clear console window
9
4303
by: darthghandi | last post by:
I am trying to create a server application using asynchronous sockets. I run into a problem when I try to connect to my server using a non-.net program. I can establish the connection, and send some packets in response to the programs first message, but when I receive a response back, it's the last packet I sent. After that packet, I receive the packet I really wanted. This only happens when I connect with local host. I tried...
0
8989
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9367
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8241
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6795
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4599
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3309
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2213
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.