Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old July 20th, 2006, 12:29 AM
Registered User
 
Join Date: Jul 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi All,
It is SQL server connection problem. either use sql server 2005 express edition since by default, ASP.NET 2.0 uses the built-in AspNetSqlProvider for storing details about the registered users
of your application and that is SQL Server Express Edition file or connect the application to sqlserver in server explorer of visual studio 2005 by providing username and password.
if the problem still exists then re-install your sql server and the following steps:

Right-click on My Computer
Select Services and Applications
Select Internet Information Services
Select Web Sites
Right-click on the web site name and select Properties from the contextual menu
Select the ASP.NET tab
Click the Edit Configuration button
When the ASP.NET Configuration Settings popup window appears, ensure the General tab is selected.
In the Application settings area, ensure the DBConn value matches the DBConn string settings in your .NET application’s Web.Config file. If it doesn’t, highlight the DBConn setting and choose the Edit button to correct this.

hope this will solve your problem.
Enjoy.......
Arun Kumar


  #12 (permalink)  
Old July 27th, 2006, 11:51 AM
Authorized User
 
Join Date: Jul 2003
Location: Ogden, Utah, USA.
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Tremmorkeep Send a message via MSN to Tremmorkeep Send a message via Yahoo to Tremmorkeep
Default

I dont have IIS on my computer and i'm running this using the utility in VS2005Pro. I get the same 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

after reading all this, I'm still not sure how to resolve it...
  #13 (permalink)  
Old July 28th, 2006, 03:12 AM
Registered User
 
Join Date: Jul 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I had the same problem...
and resolution?
Wrong connection string: I used
localhost instead of localhost\SQLEXPRESS

eg:
osql -E -S LOCALHOST
[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL
Server [2].
[SQL Native Client]Login timeout expired
[SQL Native Client]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.


osql -E -S LOCALHOST\SQLEXPRESS
1>

:) So add name of server (as shown in surface area configuration),
sqlexpress is default form XE.



  #14 (permalink)  
Old August 19th, 2006, 06:28 AM
Registered User
 
Join Date: Dec 2005
Location: karachi, sindh, Pakistan.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to shujaataptech
Default

what i have done that which sucessfully connect the sql server with other sql server (2000) is

i simply change the client configuration setting of the sql server in the odbc to TCP/IP on the port 1433 on my machine A. after that i am able to connect the sql server 2000 on placed on other machine with sql server 2005 express edition to my machine A.

MACHINE --->A---> CAN CONNECT -----> MACHINE---->B--->SQLSERVER2000
[CHANHGE ODBC ON THIS]

hello i am shujaat from pakistan
  #15 (permalink)  
Old November 5th, 2006, 05:35 PM
Registered User
 
Join Date: Nov 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you, thank you, thank you Ondra1
God bless you!!!

  #16 (permalink)  
Old February 22nd, 2007, 12:11 AM
Registered User
 
Join Date: Feb 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Win XP with SP2 may have Windows Firewall blocking you. Check this link out for more info:

http://support.microsoft.com/default...b;en-us;839269

  #17 (permalink)  
Old June 5th, 2011, 06:49 AM
Registered User
 
Join Date: Jun 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQl server doesnot allow remote connections Error 40: Named Pipes...................

I ran the application perfectly sometimes not work properly(it Shows Error 40 Network pipes..).
To rectify this, I modify the steps what ever i found in different blogs. these are time consuming....................
OMG! I loss my hair till now i didnt get the result. watz the problem.
Atlast i Found a result try this way http://www.codeproject.com/KB/aspnet/LightIIS.aspx
And
If u satisfied or found a result for Error 40 pls mail to me
praveen_asley@yahoo.com
  #18 (permalink)  
Old April 20th, 2015, 12:12 AM
Registered User
Points: 7, Level: 1
Points: 7, Level: 1 Points: 7, Level: 1 Points: 7, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2015
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by arsaral View Post
Hi,

I had the same problem I guess:

"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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"

I was trying to move Scott's DB examples from EXPRESS to PRO.

1st of all SQL Configuration must be right. TCPIP, PIPEs etc. must be enabled.

2nd I guess PRO keeps the connections open when you change solutions.
Or sthg like that. So I deleted the connections and created a new one.

3rd and most important: DO NOT FORGET to click the ADVANCED button and set the DB type to EXPRESS. Because the default is MSSQLSERVER.

Cheers.

Ali Riza SARAL


Ali R+ SARAL
I am agree with your answer, and its helps to those who suffering form same problem.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
remote sql server 2005 problem navbingo20 ASP.NET 2.0 Basics 2 July 16th, 2008 03:08 AM
Microsoft SQL Server 2005 Connection Problem dontknowmuch Java Databases 0 March 7th, 2006 11:49 PM
SQL Server 2005 webBrowser problem misterC SQL Server 2005 0 February 3rd, 2006 11:54 AM



All times are GMT -4. The time now is 12:12 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.