Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 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 January 2nd, 2006, 02:57 AM
Authorized User
 
Join Date: Nov 2003
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem connecting to SQL Express after publishing

I'm having a connection problem with SQL 2005 Express. I'm developing a site using VS2005 and used the Login server controls along with the Website Admin Tool so the base web.config and database we created automatically. If I run the site from with VS using the built in web server everything works fine, but if I publish the site to another server and try anything that touches the database, like logging in or registering, I get the error below:

Server Error in '/' Application.
--------------------------------------------------------------------------------

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've done some research and it seems to me that if the database is with the website folder, App_Data, that when ASP accesses it it's considered a local connection?

Anyone have any ideas on how I get rid of this error?

Thanks!
Bob

 
Old January 9th, 2006, 12:30 AM
Registered User
 
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you were unable to correct this with by allowing remote connections, then the issue is probably related to your machine.config or web.config not correctly specifying the ASP.Net Providers database that you are trying to connect to.
You can find a complete walk through of the fix at http://www.aquesthosting.com/HowTo/S...QLError26.aspx

Marc Talcott
www.aquesthosting.com
 
Old January 9th, 2006, 01:52 AM
Authorized User
 
Join Date: Nov 2003
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Marc, turns out the problem was that my hosting provider didn't have SQL Express installed on all their servers, the first tech support person I spoke to wasn't aware of that.

Thanks,
Bob






Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting SQL server express edition gauravawas C# 1 February 19th, 2008 05:03 PM
connecting to a sql 2005 express database twisted f8 Visual Basic 2005 Basics 1 September 13th, 2007 09:49 PM
connecting to SQL express cherry C# 2005 2 September 2nd, 2006 12:34 PM
C# connecting to SQL Express supertorro C# 0 July 10th, 2006 07:33 AM
Connecting to SQL Server Express venkikrao VB.NET 3 February 4th, 2006 12:00 AM





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