Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 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 May 22nd, 2007, 10:45 AM
Registered User
 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem connecting to ASPNETDB.MDF file

I cannot seem to connect to the ASPNETDB.MDF file provided with the chapters code. Even when I just try connecting to it directly from the Server Explorer in VS2005, I get an error. I click on new connection (under data connections), then i select "Microsoft SQL Server Database File", then I navigate to the file and select it. For the login I leave it as "Windows Authentication". Testing the connection I get the error:

"An error has occured 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)"

If anyone has any idea why I cant seem to be able to connect to the .MDF file please let me know. I do have SQL Server 2005 installed, its possible that the full version is interfering with my attempt to connect to the express edition file.

Any help is appreciated.

Nik

 
Old May 22nd, 2007, 10:50 AM
Registered User
 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Looks like I needed to read the readme.txt file that was included with the full website's code. I wish it was also included along with the chapters, making it easier to get them to run.

 
Old May 23rd, 2007, 09:04 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I always recommend people start looking at the code download right away. The book doesn't stand alone. The book assumes that you have the full code loaded up in Visual Studio. The book explains how the site was designed and it touches on the most interesting code routines. But only a small part of the code actually appears in the book.

The readme was written after the book was completed. It's purpose is to explain how to plug in the sample DB and code and make them work.

You've hit on one of the most confusing aspects of SQL Server 2005. The auto-connect feature that lets ASP.NET access a DB without first connecting it to the server is a great idea. But many of the DB tools you need for SQL database maintenance require an actual connection between SQL Server and the DB. The "look ma...no strings" idea was not fully implemented.

Eric

 
Old May 25th, 2007, 05:30 AM
Authorized User
 
Join Date: May 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I had the same error when running my application. the solution to my problem was just to remove this:
User Instance=True

in your web.config file!


error:

"An error has occured 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)"


 
Old April 24th, 2008, 09:55 AM
Registered User
 
Join Date: Apr 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i actually needed user instance im running sql express i had the same problem it might be that sql server isnt running open sql server configuration manager and turning on sql server this should be under the sql server configuration manager->sql server 2005 services






Similar Threads
Thread Thread Starter Forum Replies Last Post
aspnetdb.mdf Jackxxx ASP.NET 2.0 Basics 0 January 9th, 2007 01:37 PM
connecting ASPNETDB.MDF to an E-commerce Cart orion846 ASP.NET 2.0 Basics 1 January 2nd, 2007 11:49 AM
localhost/aspnet access of the aspnetdb.mdf file rsearing ASP.NET 2.0 Basics 22 August 4th, 2006 02:28 PM
Connecting to project MDF SQL Database File nsoivan Crystal Reports 0 July 31st, 2006 05:14 AM
Trouble connecting with .mdf file and admin tools Shell84 ASP.NET 2.0 Basics 1 February 27th, 2006 01:08 PM





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