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 2nd, 2006, 05:52 PM
Registered User
 
Join Date: Apr 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cannot run Appointment Booking application...

Hello,

I just purchased the ASP.NET 2.0 instantResults book. I'm trying to run the Appointment Booking System. When I run it, I can log in fine, but then when I try and go to "Conference Rooms", I get the error message below. Once last thing... I'm not running any instance of SQL server, I'm just running SQL server without the SQLExporess instance. I think the app is hard coding the connection string somewhere... Any help would be appreciated.

PS: I change my connection string to look like the following in my Web.Config file:

 <add name="AppointmentBooking" connectionString="server=BRIAN-LPS;AttachDbFileName=|DataDirectory|aspnetdb.mdf;I ntegrated Security=true;User Instance=true" />


Thanks,

Brian.


A user instance was requested in the connection string but the server specified does not support this option.
Changed database context to 'master'.
Changed language setting to us_english.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: A user instance was requested in the connection string but the server specified does not support this option.
Changed database context to 'master'.
Changed language setting to us_english.

Source Error:


Line 37: Catch ex As Exception
Line 38: ' Pass up the error; it will be caught by the code in the Global.asax and the generic error page set up in web.config.
Line 39: Throw
Line 40: End Try
Line 41: End Function


Source File: C:\Documents and Settings\Brian Eskra\my documents\visual studio 2005\WebSites\Book2\App_Code\DataAccess\BookingObj ectManagerDB.vb Line: 39


 
Old April 3rd, 2006, 01:17 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Brian,

The connection string is not hard coded in the application; the only place where you'll find the connection string is in the web.config (and in the AppConfiguration.vb file in the App_Code folder as a fall back mechanism in case the original connection string is missing).

I am not sure I understand what version of SQL Server you are using:
Quote:
quote:I'm not running any instance of SQL server, I'm just running SQL server without the SQLExporess instance
What does this mean? Are you using a normal version of SQL Server (e.g. Standard or Enterprise?) If so, you cannot use the User Instance setting, nor the AttachDbFileName. You'll need a normal connection string.

If you let me know what SQL Server you are using, I can help you further.

BTW, if I were you, I'd install SQL Express as well. It makes local development (and following along with the book) much easier.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old May 16th, 2008, 03:08 AM
Registered User
 
Join Date: May 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I got the same error as following:
A user instance was requested in the connection string but the server specified does not support this option.
Changed database context to 'master'.
Changed language setting to us_english.

On my computer, I don't have SQL Server Express version because I installed the SQL Server 2005 (SQL Server 8.0.194)
Please help me how to fix connection string in web.config using Windows Authentication in the following code.

<connectionStrings>
    <add name="SqlServerConnectionString" connectionString="server=AVT2K6;AttachDbFileName=| DataDirectory|PhotoDB.mdf;Integrated Security=true;User Instance=true"
      providerName="System.Data.SqlClient" />
    <add name="ConnectionStringComments" connectionString="Data Source=localhost;AttachDbFilename=|DataDirectory|\ PhotoDB.mdf;Integrated Security=True;User Instance=True"
      providerName="System.Data.SqlClient" />
  </connectionStrings>

Thanks.

 
Old May 16th, 2008, 03:18 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

As the error message suggest you are trying to use user instances (User Instance=true) which is not supported on the version of SQL Server you are using.

For connection strings for SQL 2005, take a look here:
http://www.connectionstrings.com/?carrier=sqlserver2005

Cheers,

Imar


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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Extending Appointment booking application babak BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 10 September 21st, 2008 03:05 AM
Appointment Booking KDSTECH BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 11 May 29th, 2008 12:46 AM
Appointment booking philblack1 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 5 January 25th, 2008 01:17 PM
Appointment Booking problem outofwork BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 42 May 15th, 2007 04:56 PM
Appointment Booking Problem richardson167 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 5 February 26th, 2007 07:00 AM





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