Can't Connect .Net application from Windows Server 2003 to Database Server (SQL Server 2000)

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.SqlClient.SqlException: 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

 

0
orandov
4/3/2008 7:18:42 PM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

4 Replies
1013 Views

Similar Articles

[PageSpeed] 27

Hello Oran,

You requested that we don't ask why you have a DB server outside your firewall, so I won't, but let me tell you the temptation is really strong.

Now, If *I* were your network admin, I would have different segments on the firewall for servers, clients, and the internet at a minimum. Again, I don't have any information about your firewall configuration, so ask your network admin the following:

  • Are your XP client and the 2003 App server on different segments on your firewall? If so, are there rules applied to the server segment blocking bidirectional connection to the db server?
  • Are your client and the app server on different subnets as far as the firewall is concerned, and if so are there rules in the rule sets that would prevent the app server from establishing a bidirectional connection to the db server?
  • Does he/she see any log activity on the firewall indicating that packets from the app server to the db server, or from the db server to the app server are being blocked?
  • Why are there any servers outside the company firewall? (Sorry, I couldn't resist...)

I hope that helps pointing you in the right direction. There's still a lot of unknown variables to solve for given the problem description...

 

Best of luck,

 

Greg 

 


"Give a man a fire and he'll stay warm for a day.
Set a man on fire and he'll stay warm for the rest of his life."
0
Shodan240z
4/3/2008 8:26:02 PM

Thanks for the suggestions. I will talk to the network admin and see what we can do.

I can't answer the million dollar question as to why the DB server is outside the firewall b/c I don't know. The true is that nobody left in the company knows the real reason. The people who deemed it necessary are no longer with the company anymore and I just got here. However we are planning on moving it into the firewall after we analyze the processes and systems that communicate with the server.

Oran

0
orandov
4/3/2008 8:43:27 PM

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

0
orandov
4/4/2008 7:29:19 PM

 In SQL 2005 you have to explicitly grant remote connections. You can set this in configuration manager or surface area configuration:

Allow TCP/IP connectons

Set up Alias 

0
raghu1
4/4/2008 7:37:15 PM
Reply:

Similar Artilces:

can't connect to sql server database with same connection used in visual studio .net 2003
I have the following code that works fine in visual studio .net 2003 but not with VWD.  I have sql server 2000 developer edition installed locally and this connection works fine with visual studio.  With VWD it fails with the exception "System.Data.SqlClient.SqlException: Login failed for user 'DARRELL\ASPNET'".  It fails on the conn.Open line.   any ideas on what the issue is?Dim conn As SqlConnectionDim connstr As Stringconnstr = "Data Source=DARRELL;Initial Catalog=Event;Integrated Security=SSPI;"Dim daEvents As New SqlDataAdapter("select * from events", connstr...

This version of Microsoft Sql Server Management Studio can only be used to connect to Sql Server 2000 and Sql Server 2005 servers
When I connect SQL Server 2005 to a remote database i get the error: "This version of Microsoft Sql Server Management Studio can only be used to connect to Sql Server 2000 and Sql Server 2005 servers". Can I confirm it is because: the remote db is of SQL Server 2008? There is a soln mentioned in http://forums.asp.net/t/1324047.aspx Did anybody try this (installing 2008 express: http://www.microsoft.com/express/sql/download/)? I am just checking again, whether it will disturb my existing SQL Server installation, in any means...? Though it is mentioned that it will g...

2008 IIS7 connection to SQL Server 2000 on Web Server 2000: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
I am setting up a windows 2008 IIS7 web server, and trying to connect to a windows 2000 sql server 2000 database. I have an IIS6 Windows 2000 web server activately connected just fine. I have anonymous and windows authentication enabled. And in my web.config I have identity impersonate="true" My sql server 2000 typically uses the IISUSER anonymous user set up in IIS6 on my original windows 2000 web server. But this new IIS7 is giving me grief. I can't seem to setup the IUSR or IISUSER or anything in it. I can't even use sql server credentials in my connection string altho...

ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP Address of the server'(10048) ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP of the server' (10
Hi, I am randomly getting the following error message in my application. ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP Address of the server'(10048) ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP of the server' (10048) I am using .Net 2.0 with VS2005 having ODBC 3.51.14 Driver.  Can any body point out the core reasons of the above error message? Thanks. Nouman Khawaja. I do have the same problem, help me out. Thanks  If the going seems easy, You are going DownHill... When I was writing ...

SQL Server Reporting Services for SQL SERVER 2000 AND Visual Studio.NET 2005 .NET 2.0
Hi, Which version of SQl Server Reporting Services will work with SQL SERVER 2000 in pararrel with ASP.NET 2.0 (.NET 2.0 framework)?  Thanks, Azam HighOnCodingWanna get high! Hi, Okay I got the answer. Yes, we can use the SQL SERVER 2005 Reporting Services with SQL SERVER 2000. HighOnCodingWanna get high! ...

My CR Report cann't connect to remote Sql 2000 server in my Ap.net application ?
hello all:              I'v developed  an asp.net application to Purchase Material in my Lan,I used vs.net 2003 and a remote sql 2000 server(a server named "hhmv-web"),now I can create new data ,update and enquire data in my system. but when I print the order,there always has error like this:      CrystalDecisions.CrystalReports.Engine.LogOnException: logon Failed。 行 49: .ExportFormatType = CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat 行 50: End With 行 5...

[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Hello All, I'm Getting the following error when calling a dll from my vb.net application. [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. The dll was written in vb6 and accesses a sql db using the following connection string. Public Const GLOBAL_DNS As String = "DSN=TransSrvFinal;UID=sa;PWD=admin;" This DLL works fine when called from other Windows Apps. However I'm now trying to call this dll from with in an asp.net application. I'm using vb.net as the codebehind. I'm a...

how can associated 'sa' with a trusted SQL Server connection in sql server 2005?
I want to use sa user login sql server 2005 to visit my database "dotnet20" but when I set the user property in User Mapping, It Report when I set it, An Error Occur like followCannot use the special principal 'sa'. (Microsoft SQL Server, Error: 15405)and also when I want to Login sql server use 'sa' user, It Report Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452)how can  associated 'sa' with a trusted SQL Server connection? I'm having this exact same problem. When I login using Windows authent. I can co...

SQL Server 2000 and SQL Server 2005 in the same server
Can enyone please send me a link to a white paper explaining how to run both SQL Server 2000 and 2005 in the same machine?Thanks. I don't know about the white paper but I had both running on my machine for a while by making the SQL 2000 a named instance. So for SQL 2005 connection strings my server name was (local) while for SQL 200 using the named instance it was (local)\joesql where joesql was the instance nameHope it helps,Joe http://www.joeaudette.comhttp://www.mojoportal.com...

How can I get the 'entire' database, structure and data, from SQL server 2008 to SQL server 2005?
1) I can't get the 'copy database' function to work from SQL Server 2008 to SQL Server 2005. I connect ok. Everything goes to the last step and then it fails.2) I cant get a SQL server 2008 backup to restore on SQL SEerver 2005 either. The only way I know that works is to script the creation of all tables then export and import. This does work. How can I get the 'entire' database, structure and data, from 2008 to 2005? ThanksSQL newbie. Visual Studio 2008 supports a type of project called a database project. You might try importing the schema of t...

Can Sql Server Express 2005 Run a Sql Server 2000 database?
Should be a quick question:I've got a client with a Sql Server 2000 database.  He wants to hook it up to a server that is only running Sql Server Express 2005.  Can this work? Thanks!-Craig U-Sports.net - Taking Fantasy Football to School Tell him to Backup the database and send you the .bak you can restore it as 2005 database.  I have posted a FAQ about moving SQL Server databases and there is a free chapter about Backup and Restore in the link below.  Hope this helps.  http://forums.asp.net/thread/1454694.aspxKind regards,Gift Peddie Thanks!  I will rec...

SQL Server 2005 error when trying to connect to sql server 2000 database
Hi all.I am working on asp.net 2.0 with back end as sqlserver 2000. but when trying to connect to the database i am getting the following error displayed 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) Description: An unhandled exception occurred during the execution of the current web request. Please review the...

Can I use Bugzilla with Sql server 2000 or sql server 2005 as backend Database
I have Just Successfully installed Bugzilla My installation are Bugzilla 2.2 Apachec Webserver ActivePerl 7.8 Mysql 5.0 Now I like That My Database should be Sql server 2000 or sql server 2005 Can I do that [As I also see that I required some Perl module of Mysql as well] ...

moving an sql server 2005 database to a sql server 2000 database
I am trying to move a database which I wrote in SQL Server 2005 to a SQL Server 2000 database. I'm not sure the best way to do this....... Can anyone enlighten me?.....   this article explains it. http://searchsqlserver.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid87_gci1149585_tax301536,00.html hth,mcm pizzamaker74: I am trying to move a database which I wrote in SQL Server 2005 to a SQL Server 2000 database. I'm not sure the best way to do this....... Can anyone enlighten me?..... If both are in the same network or box just register the 2005 with the 2000 cr...

Web resources about - Can't Connect .Net application from Windows Server 2003 to Database Server (SQL Server 2000) - asp.net.sql-datasource

Application - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

The Bachelor 2016 application process can get explicit - Laurina Fleure
CHANNEL Ten is calling on singles to sign up for a chance to find love on The Bachelor , but willing applicants have to open a lot more than ...

Perth man’s Afghan wife slapped with 10-year visa application ban - PerthNow Search Search
A MAN’S three-year struggle to have his wife live with him in Australia has ended in heartache after his spouse was slapped with a 10-year ban. ...

Application developers struggle to adapt to changing licensing models
Application producers are aware of rapid change impacting their ability to make money from their software products, but they're not adopting ...

MBA: Mortgage Applications Decrease in Latest MBA Weekly Survey, Purchase Applications up 30% YoY
From the MBA: Mortgage Applications Slightly Decrease in Latest MBA Weekly Survey Mortgage applications decreased 0.2 percent from one week ...

Elon Musk Requests Applications For Autopilot Software Engineers On Twitter
... and more quickly achieve “generalized full autonomy.” So, if you ever wanted to work for Tesla in such a [&hellip Elon Musk Requests Applications ...

Mortgage applications down 0.2%
Mortgage interest rates haven't moved much in the past three weeks, but they are holding at a higher level than for all of 2015.

Number Of Daily Applications To French Military TRIPLES Overnight
Number Of Daily Applications To French Military TRIPLES Overnight

LED market saturation to drive industry to seek profits in new applications in 2016, says LEDinside
According to LEDinside, LED makers had an especially tough year in 2015. "Despite rising LED lighting market demand and the large scale replacement ...

Windows 10’s broken fall update removes user-installed applications without asking first
Microsoft's latest Windows 10 update is causing problems for at least some users, and uninstalling programs without the user's consent or evidence ...

Resources last updated: 12/6/2015 8:23:51 AM