Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2007

Tip: Looking for answers? Try searching our database.

ASP .net 1.2 connect to SQL

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
patrick_keton@yahoo.com - 24 Jul 2007 13:52 GMT
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
Juan T. Llibre - 24 Jul 2007 14:21 GMT
re:
!> under the default settings SQL Server does not allow remote connections

Please review this KB :

http://support.microsoft.com/default.aspx?scid=kb;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/
======================================
>I am trying to connect to a dabase located on server 2 from my asp.net
> 1.2 web pages located on server 1
[quoted text clipped - 17 lines]
> Is there something wrong with my code.
> Please advice
Cowboy (Gregory A. Beamer) - 24 Jul 2007 14:53 GMT
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.

Signature

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!
************************************************

>I am trying to connect to a dabase located on server 2 from my asp.net
> 1.2 web pages located on server 1
[quoted text clipped - 17 lines]
> Is there something wrong with my code.
> Please advice
patrick_keton@yahoo.com - 25 Jul 2007 06:21 GMT

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.