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 June 6th, 2006, 12:16 AM
Registered User
 
Join Date: Jun 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can't get any of the samples to run...

The chapters that prompted me to purchase this book (and yes, I purchased it and not just downloaded the code for free) are :

Chapters 10 and 12


I ran through the installers on both. I get the main screen but can't log into the system. Here's what I get on Chapter 10:

Can you point me in the right direction?




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

Cannot open user default database. Login failed.
Login failed for user 'WXP-WILLOW\ASPNET'.
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: Cannot open user default database. Login failed.
Login failed for user 'WXP-WILLOW\ASPNET'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SqlException (0x80131904): Cannot open user default database. Login failed.
Login failed for user 'WXP-WILLOW\ASPNET'.]
   System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection) +735107
   System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj) +188
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838
   System.Data.SqlClient.SqlInternalConnectionTds.Com pleteLogin(Boolean enlistOK) +33
   System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
   System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
   System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359
   System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
   System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection owningObject) +424
   System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection owningObject) +66
   System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection owningObject) +496
   System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection owningConnection) +82
   System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
   System.Data.SqlClient.SqlConnection.Open() +111
   System.Web.DataAccess.SqlConnectionHolder.Open(Htt pContext context, Boolean revertImpersonate) +84
   System.Web.DataAccess.SqlConnectionHelper.GetConne ction(String connectionString, Boolean revertImpersonation) +197
   System.Web.Security.SqlMembershipProvider.GetPassw ordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121
   System.Web.Security.SqlMembershipProvider.CheckPas sword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105
   System.Web.Security.SqlMembershipProvider.CheckPas sword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42
   System.Web.Security.SqlMembershipProvider.Validate User(String username, String password) +83
   System.Web.UI.WebControls.Login.OnAuthenticate(Aut henticateEventArgs e) +160
   System.Web.UI.WebControls.Login.AttemptLogin() +105
   System.Web.UI.WebControls.Login.OnBubbleEvent(Obje ct source, EventArgs e) +99
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
   System.Web.UI.WebControls.Button.OnCommand(Command EventArgs e) +115
   System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) +163
   System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
 
Old June 6th, 2006, 02:33 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,

Are you using the SQL Server Express Edition as your database, or are you using one of the commercial versions of SQL Server (e.g. the Standard edition)??

Did you grant read/write permissions to the App_Data folder for the 'WXP-WILLOW\ASPNET' account?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old June 6th, 2006, 11:31 PM
Registered User
 
Join Date: Jun 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default


Thank you for responding to my post, Imar.

I am using both actually. However, I made sure that I have read-write on the data directory. Now, I can get to the login screen, but I still cannot get past that screen.

For the appointment booking system, I can't seem to login. There weren't any sample logins like the BugBase chapter does.

Furthermore, upon trying to log into the bugbase using the logins in Chapter 12, none seem to work.

I would really like to get this working so I can be down the road but I'm stuck at this point.

Thank you,
Colin


 
Old June 7th, 2006, 02:25 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 Colin,

Chapter 10 does have a login account. On page 312, at the bottom, you see the Administrator account (Administrator / Admin123#).

In addition to that, new users can sign up for an account to be able to make appointments. For that to work, you need to configure a mail server at the end of the web.config file.

For the BugBase chapter: maybe this post helps: http://p2p.wrox.com/topic.asp?TOPIC_...hTerms=bugbase

There seems to be a problem with the database when you run it through IIS. The link I posted describes the steps you need to follow to fix the problem.
If you can't make it work, let me know and I'll create a new database, just like I did for the CMS site.

Hope this helps,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old June 14th, 2006, 10:01 PM
Registered User
 
Join Date: Jun 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK..tried to login using the "sample" Administrator/Admin123# account pair and it seemed to let me in...but...after I chose a date to "check availability", this is what I get:




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

Login failed for user ''. The user is not associated with a trusted SQL Server connection.
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: Login failed for user ''. The user is not associated with a trusted SQL Server connection.

Source Error:


Line 208: Return myDataSet
Line 209: Catch ex As Exception
Line 210: Throw
Line 211: Finally
Line 212: myConnection.Close()


Source File: C:\inetpub\wwwroot\AppointmentBooking\App_Code\Dat aAccess\AppointmentManagerDB.vb Line: 210

Stack Trace:


[SqlException (0x80131904): Login failed for user ''. The user is not associated with a trusted SQL Server connection.]
   System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection) +735107
   System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj) +188
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838
   System.Data.SqlClient.SqlInternalConnectionTds.Com pleteLogin(Boolean enlistOK) +33
   System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
   System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
   System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +130
   System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
   System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection owningObject) +424
   System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection owningObject) +66
   System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection owningObject) +496
   System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection owningConnection) +82
   System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
   System.Data.SqlClient.SqlConnection.Open() +111
   System.Data.Common.DbDataAdapter.FillInternal(Data Set dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +86
   AppointmentManagerDB.GetTimeSheet(DateTime selectedDate) in C:\inetpub\wwwroot\AppointmentBooking\App_Code\Dat aAccess\AppointmentManagerDB.vb:210
   AppointmentManager.GetTimeSheet(DateTime selectedDate) in C:\inetpub\wwwroot\AppointmentBooking\App_Code\Bus inessLogic\AppointmentManager.vb:66
   CheckAvailability.LoadData() in C:\inetpub\wwwroot\AppointmentBooking\CheckAvailab ility.aspx.vb:13
   CheckAvailability.calAppointmentDate_SelectionChan ged(Object sender, EventArgs e) in C:\inetpub\wwwroot\AppointmentBooking\CheckAvailab ility.aspx.vb:31
   System.Web.UI.WebControls.Calendar.OnSelectionChan ged() +117
   System.Web.UI.WebControls.Calendar.SelectRange(Dat eTime dateFrom, DateTime dateTo) +242
   System.Web.UI.WebControls.Calendar.RaisePostBackEv ent(String eventArgument) +827
   System.Web.UI.WebControls.Calendar.System.Web.UI.I PostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +174
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102



 
Old June 15th, 2006, 12:12 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Did you change the connection string in your web.config file to have it point to another server? Are you no longer using the Express database that came with the book?

Can you post your connection string (without personal data like passwords)?

Also, take a look here: http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=395
Normally you get this error when you connect to a SQL Server that only allows Windows authentication, but you provide SQL authentication details.

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old June 16th, 2006, 09:31 AM
Registered User
 
Join Date: Jun 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar,

I will try your suggestions asap. I printed your previously mentioned FAQ and it sounds like it will help. Currently, I am running both SQL 2005 (standard desktop) along with SQLEXPRESS (downloaded from VWD). I should have time this weekend to get this rolling and I'll post again once I've had a chance to apply your suggestions.

Thanks again for monitoring/responding to this thread. I appreciate the fact that WROX / you are actually active participants in this forum.

CW
 
Old June 16th, 2006, 07:26 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Sounds good. Keep me posted if you want. Hopefully, you can get this up and running pretty soon....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004





Similar Threads
Thread Thread Starter Forum Replies Last Post
Code Samples qjay BOOK: Professional Microsoft Robotics Studio ISBN: 978-0-470-14107-6 17 July 13th, 2009 04:10 AM
Could not run samples datawiz1 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 10 August 11th, 2007 11:22 AM
Need samples mindserve VB.NET 2002/2003 Basics 0 August 5th, 2007 08:24 AM
Samples? dugi Wrox Book Feedback 1 November 5th, 2003 11:02 AM





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