Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 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
  #1 (permalink)  
Old May 22nd, 2007, 10:45 AM
Registered User
 
Join Date: May 2007
Location: , , .
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

  #2 (permalink)  
Old May 22nd, 2007, 10:50 AM
Registered User
 
Join Date: May 2007
Location: , , .
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.

  #3 (permalink)  
Old May 23rd, 2007, 09:04 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
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

  #4 (permalink)  
Old May 25th, 2007, 05:30 AM
Authorized User
 
Join Date: May 2007
Location: Oslo, , Norway.
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)"


  #5 (permalink)  
Old April 24th, 2008, 09:55 AM
Registered User
 
Join Date: Apr 2008
Location: , , .
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

 


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
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



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


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