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 July 18th, 2006, 08:39 AM
Registered User
 
Join Date: Jul 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Modifying Appointment booking app

I have found this book quite helpful. Thanks
I work at a private school with three computer labs.
I would consider myself a hack when it comes to programming. I have experience in both C# an VB.net. I am have been able to modify the app for the most part. I changed the hour picker control to a control to pick the class period and have added a field of type integer to the appointment table to store this as well as making the other necessary changes. There is only one thing missing. I know you have a reporting page for the appointments in the management section. But I would prefer to display this info below the time sheet on the check availability page. This way the teachers can se who has booked the lab when checking the availability. I have considered adding the nested repeater control you used to the page but I am having problems getting it to work. All I need is to display who as booked what lab during what period for the selected day. Any suggestions would be appreciated.

 
Old July 18th, 2006, 10:40 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,

Glad you like the book!

When you say "I am having problems getting it to work" what exactly do you mean? Do you get errors? Can you describe your problems in more detail?

I think copying most of the stuff from the Appointments.aspx to a separate control or the Check Availability page is probably the easiest thing to do. From your description, it seems that the page in the Admin section already does what you want, so reusing sounds logical. You should copy both repeaters and most of the code in the Code Behind. Instead of the Calendar on the Appointments.aspx page, you can reuse the one from the Check Availability page.

To make it easier to change the app in the future, you could move the repeaters and the code behind logic to a User Control that you can reuse in the Management section and in the public front-end. If you give the control a SelectedDate property, you have encapsulated your functionality in one single control that can easily be reused across other pages.

If you let me know what you're having problems with, I might be able to give better advice.

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 July 18th, 2006, 12:37 PM
Registered User
 
Join Date: Jul 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for such a quick response. I went and copied the necesaary code and mark up to their respective "checkavailability" pages. It works great.

Thanks again

I may be want to use this app on our new sharepoint 2007 site. We haven't deployed it yet. Do you have any suggestions or advice concerning this?

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

I don't have much experience with Sharepoint 2007, so I can't suggest much about that.

However, the app is designed as a stand alone app, so as long as you install it as a separate website or Virtual Directory in IIS, you should have no trouble configuring and running it.

The only thing that you may need to change is the connection string to SQL Server.

Let me know if you have other questions regarding the application or its installation.

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 July 29th, 2006, 12:38 AM
Registered User
 
Join Date: Jul 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am having isuues installng this app on IIS. I am not sure if it is the configuration or if it is because of the modifications that i made. What would you recommend for installing this as a stand alone app on IIS? I changed the membership provider to an Active Directory membership provider. It all works fine in visual web developer.

 
Old July 29th, 2006, 01:27 AM
Registered User
 
Join Date: Jul 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

FYI the AD membership provider is using a local instance of ADAM

 
Old July 29th, 2006, 01:08 PM
Registered User
 
Join Date: Jul 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

More details on the problem i mention earlier:

OK I got the app to run on IIS somewhat. The problem occurs when I try to access the management section. I can login and authenticate against ADAM but I think the problem is with the SQL role provider. Due to the fact that the app is using the same database as the role provider I am not sure as how to go about it.

Her is the error message:

Cannot open user default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
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 'NT AUTHORITY\NETWORK SERVICE'.

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 'NT AUTHORITY\NETWORK SERVICE'.]
   System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection) +734995
   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.SqlRoleProvider.GetRolesForUse r(String username) +771
   System.Web.Security.RolePrincipal.IsInRole(String role) +272
   System.Web.Configuration.AuthorizationRule.IsTheUs erInAnyRole(StringCollection roles, IPrincipal principal) +120
   System.Web.Configuration.AuthorizationRule.IsUserA llowed(IPrincipal user, String verb) +300
   System.Web.Configuration.AuthorizationRuleCollecti on.IsUserAllowed(IPrincipal user, String verb) +191
   System.Web.Security.UrlAuthorizationModule.OnEnter (Object source, EventArgs eventArgs) +3394974
   System.Web.SyncEventExecutionStep.System.Web.HttpA pplication.IExecutionStep.Execute() +92
   System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +64


Thanks for your help

 
Old July 29th, 2006, 02:09 PM
Registered User
 
Join Date: Jul 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think I got I just created another Role provider to connect the same databse that I attached. It seems to work fine now. If I have any more issues I wil be back. please let me know if this is the right way to do this

Thanks

 
Old July 30th, 2006, 03:36 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 there,

Since I don't know exactly what you have done, it's hard to say it's the best way to do it... ;)

Why did you have to create (configure??) another role provider to make this work?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old July 31st, 2006, 07:24 AM
Registered User
 
Join Date: Jul 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I configured another SQL Role provider to use the original database that you created. After I sent this last message I opened the website administration tool and saw that there were no roles created. I went ahead and created a new Manager role. And added a user account to it. Everything worked. I then took a look at the Roles table and saw that there was another Manager Role associated with a different application ID. Does this clarify things better? Sorry to be so vague earlier. Any comments or suggestions would be appreciated.

Also do you know a good reference for learning stored procedures? What really attracted me to this application was its ability to check for time conflicts. I would really like to understand this stored procedure and stored procedures in general better.






Similar Threads
Thread Thread Starter Forum Replies Last Post
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 System newbie07 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 July 18th, 2007 08:32 AM
Appointment Booking problem outofwork BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 42 May 15th, 2007 04:56 PM
Modifications to Appointment Booking... mkumar BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 7 March 31st, 2007 01:51 AM





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