Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > BOOK: Professional C# 2005
|
BOOK: Professional C# 2005
This is the forum to discuss the Wrox book Professional C# 2005 by Christian Nagel, Bill Evjen, Jay Glynn, Karli Watson, Morgan Skinner, Allen Jones; ISBN: 9780764575341
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional C# 2005 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 February 28th, 2006, 11:34 AM
Registered User
 
Join Date: Feb 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Downloaded code for PCSDemoSite, Ch27

I just downloaded this code and it wouldn't run. I extracted the whole file structure including all 4 websites. The other 3 websites in the download work. The PCSDemoSite starts up in the browser with no errors, warnings or messages. However, it gives this error as soon as I try to log in as User1, using password User1:

"Procedure or function aspnet_Membership_GetPasswordWithFormat has too many arguments specified."

This is followed by a screen-filling Stack Trace dump.

Has anyone seen this problem? Is this is a bug in the original code? I'm not quite proficient enough yet.

Thanks!

Jim
 
Old March 9th, 2006, 04:38 AM
Authorized User
 
Join Date: May 2004
Posts: 83
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi,

I've just purchased this book and it's excellent. BTW I also own prior version of this book.

Now come to the point. I've not yet read that chapter but can give you some hints to hunt the bug down.


  • Open the web.config file of the website in error and locate the compilation tag. Make sure it reads like this:
    Code:
    <compilation language="C#" debug="true" />
  • Open the SQL server database used in the sample and, drill down to Stored Procedures and double click the aspnet_Membership_GetPasswordWithFormat stored procedure. This opens the stored procedure in an editor.
  • Now run your web site and place a breakpoint where your c# code is calling the stored procedure.
  • The problem must be that the C# code is passing more parameters to the stored procedures that it has defined. For example, it may have a @UserID and @Password parameters but you code might be trying to pass it @UserType parameter along with the two other parameters. Since @UserType parameter is not defined the stored proc will throw error.
  • Make sure you remove any extra parameters that're being supplied. [*/]

Hopefully, you should be able to solve the problem.

ejan
 
Old February 4th, 2009, 12:37 PM
Registered User
 
Join Date: Feb 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP 2.0 fix

Had the same problem, and couldn't find anywhere Visual Studio would accept a breakpoint. After two hours of head-banging, the answer turned out to be M$ changed something when ASP 2.0 left beta, and Wrox haven't updated their sample code to be compatible.

To fix, do this from the command-line:

aspnet_regsql -A all -C "Data Source=.\SQLEXPRESS;Integrated Security=True;User Instance=True" -d "C:\ProCSharp\Chapter27\Websites\PCSDemoSite\App_D ata\aspnetdb.mdf"





Similar Threads
Thread Thread Starter Forum Replies Last Post
downloaded code Joseph BOOK: Beginning SQL 5 December 23rd, 2007 09:35 PM
can't understand this code I downloaded am6019a VB How-To 1 July 7th, 2006 09:11 AM
error in downloaded code hertendreef BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 April 9th, 2006 04:56 AM
Problem with downloaded code Jags ADO.NET 1 April 10th, 2005 03:56 PM
ThePhile C# Downloaded code aruny2kprasad General .NET 3 April 16th, 2004 03:02 AM





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