Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 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 April 4th, 2007, 06:41 AM
Authorized User
 
Join Date: Mar 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL Server Remote Access error

Hi I'm getting the following error message when my users try to log into my website.

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 read some of the documentation, telling me to make changes to SQL Server configuration, but I don't have access to this as it is hosted by a 3rd party - and they seem to think it has been done.

I'm using the membership in ASP.NET, but I haven't set anything special up in user roles or configuration files on my website. Am I missing something? It works perfectly on my development machine.

Thanks

 
Old April 4th, 2007, 12:00 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi sterreyl,

If the host has configured it correctly, then the problem may be in the way you connect to the server. Maybe you're referring to something like (local)\SqlExpress??

How does your connection string look like? If you post it here, be sure to remove sensitive information like the username and password...

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old April 18th, 2007, 06:22 AM
Authorized User
 
Join Date: Mar 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar, apologies it has taken me a while to reply, I've moved everything to a managed server now hoping to resolve the issue, and I'm still having the same problem!

The connection is (as per various websites):

<remove name="LocalSqlServer"/>

<add name="LocalSqlServer" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=&quot;C:\DIRE CTORY\ASPNETDB.MDF&quot;;Integrated Security=True;Connect Timeout=30;User Instance=True"
            providerName="System.Data.SqlClient" />

I've tried changing the remote settings in Surface Area Configuration, but I'm at a total loss on this one.

Any help is most appreciated.

Thanks Lee

 
Old April 18th, 2007, 09:54 AM
Authorized User
 
Join Date: Mar 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok after much more searching I have found the correct connection string:

<connectionStrings>
    <clear />
    <add name="localSqlServer" connectionString="server=servername;user id=username;password=mypassword;database=databasen ame"/>
  </connectionStrings>

Thank you for the replies

 
Old April 18th, 2007, 01:24 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yeah, with a site on a production server, that's often how the connection string looks like. This:

Data Source=.\SQLEXPRESS

refers to a local SQL Server instance called SQLExpress. This is normally only the case on your development machine.

Glad it's working now.

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote connection error with SQL Server Express DudeBori82 SQL Server 2005 4 April 12th, 2009 01:51 AM
Remote Access to SQL Server Express Bob Bedell .NET Web Services 6 December 21st, 2007 10:50 AM
SQL Server remote connection error sterreyl ASP.NET 2.0 Basics 1 April 6th, 2007 07:17 PM
SQL Server Access across a remote machine rajen SQL Server 2000 3 July 27th, 2006 02:28 PM
VB Express and SQL server on remote server questio HoosierDaddy61 Visual Basic 2005 Basics 0 February 22nd, 2006 11:27 AM





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