473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

ASP .net 1.2 connect to SQL

I am trying to connect to a dabase located on server 2 from my asp.net
1.2 web pages located on server 1

Am using following connection string:

"Integrated Security=SSPI;Persist Security Info=False;User
ID=myuid;Password=mypass;Initial Catalog=mydb;Data Source=myserver"

Error returned by Server 2 is

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)
Line Number: 0
Source: .Net SqlClient Data Provider
Procedure:

Is there something wrong with my code.
Please advice

Jul 24 '07 #1
3 1481
re:
!under the default settings SQL Server does not allow remote connections

Please review this KB :

http://support.microsoft.com/default...b;EN-US;914277

Also, for future inquiries, there's no "asp.net 1.2".
There's asp.net 1.1 and asp.net 2.0...but no asp.net 1.2.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
<pa***********@yahoo.comwrote in message news:11********************@z28g2000prd.googlegrou ps.com...
>I am trying to connect to a dabase located on server 2 from my asp.net
1.2 web pages located on server 1

Am using following connection string:

"Integrated Security=SSPI;Persist Security Info=False;User
ID=myuid;Password=mypass;Initial Catalog=mydb;Data Source=myserver"

Error returned by Server 2 is

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)
Line Number: 0
Source: .Net SqlClient Data Provider
Procedure:

Is there something wrong with my code.
Please advice

Jul 24 '07 #2
Simple:

1. Make sure you have a protocol you can talk to. By default, some versions
of SQL Server use in-memory only. Add a protocol like TCP using the SQL
Configuration tool.
2. Turn on the SQL Browser service in the services administration tool and
make sure it is set to start automatically when you reboot after patches.

After that, you should have no issues. Juan has also posted a link to a KB
article that has more detail.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

************************************************
Think outside the box!
************************************************
<pa***********@yahoo.comwrote in message
news:11********************@z28g2000prd.googlegrou ps.com...
>I am trying to connect to a dabase located on server 2 from my asp.net
1.2 web pages located on server 1

Am using following connection string:

"Integrated Security=SSPI;Persist Security Info=False;User
ID=myuid;Password=mypass;Initial Catalog=mydb;Data Source=myserver"

Error returned by Server 2 is

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)
Line Number: 0
Source: .Net SqlClient Data Provider
Procedure:

Is there something wrong with my code.
Please advice

Jul 24 '07 #3
Thanks a lot

Jul 25 '07 #4

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

Similar topics

22
by: James Kupernik | last post by:
Hello everyone! I'm hoping someone can shed some light on my ever daunting mysql/php problem. I'm currently trying to get a new server up and running using apache/php/mysql. Everything runs...
4
by: Steve Smith | last post by:
I have just installed db2 connect v8.1 (personal edition) on my PC - and reinstalled DB2 Application development client (again v8.1 FP4). When trying to use this to connect via CLI to an AS/400...
6
by: Jerry Orr | last post by:
We are trying to determine the easiest (and cheapest) way to get connections for about 50 Win2K workstations on our LAN to DB2 on a z/OS server. We could install DB2 Connect Personal Edition on...
30
by: aka | last post by:
Hi I have a DB2 v8.1 on AIX and DB2 Connect EE on Solaris wich is connected to OS/390 DB2 subsystems via APPC / SNA. I have cataloged the DB2 Connect instance as tcpip node and then the Host DB...
0
by: Zorba.GR | last post by:
IBM DB2 Connect Enterprise Edition v8.2, other IBM DB2 (32 bit, 64 bit) (MULTiOS, Windows, Linux, Solaris), IBM iSoft Commerce Suite Server Enterprise v3.2.01, IBM Tivoli Storage Resource Manager...
5
by: mayamorning123 | last post by:
A comparison among six VSS remote tools including SourceOffSite , SourceAnyWhere, VSS Connect, SourceXT, VSS Remoting, VSS.NET To view the full article, please visit...
5
by: rAinDeEr | last post by:
Hi, Y'day one of my friend showed me how to connect to a Oracle database as SYSDBA, DBA etc I have DB2 UDB installed in Linux machine.Right now, I have a user WADI which has got some...
14
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that...
2
by: zgh1970 | last post by:
Hi, All, I have question on DB2 CONNECT configure. We installed DB2 ESE V8 FixPak 14 o AIX . When we set up the connection to DB2 Mainframe. We just catalog node and DB directory without DCS....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.