Wrox Programmer Forums
|
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design 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
 
Old December 6th, 2006, 02:57 AM
Authorized User
 
Join Date: Oct 2006
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error 40

I'm using VS2003 and SQL2000. I created a database name "myDatabase" in SQL Server 2000 and built a website that
connet to this database. When I'm running this website in VS2003 IDE (press F5 or Ctrl-F5), everything is OK.
It was my localhost. Then I tried to install again on my server after installing .NET framework 2.0.But when my application
is trying to connect sql server, it is giving error like this:

"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) (Microsoft SQL Server, Error: 2)"

My connection string was: Server:XYZ;uid=sa;password=hello;Database=NewProje ct.

Now, I don't know how to fix it. Pls help me as soon as possible.
Regards.


 
Old December 6th, 2006, 06:04 AM
Registered User
 
Join Date: Dec 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

run aspnet_regsql on a command prompt of .net.
Then a wizard will come so u can set wot ever the database u use,it will take it as a default.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Error 40. Do anyone known it? Please help! avgCS Classic ASP Basics 0 July 27th, 2007 06:53 AM
Error 40 prasanta2expert SQL Server 2000 1 December 7th, 2006 01:31 AM
Error 40 prasanta2expert ASP.NET 1.0 and 1.1 Basics 0 December 6th, 2006 02:58 AM
Named Pipes Provider, error: 40 ipaine SQL Server 2000 1 November 14th, 2006 03:36 AM
using &#40 instead of ( crmpicco HTML Code Clinic 5 April 10th, 2006 09:06 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.