Hello all,
Not sure if this is the right place to post this.
I ran up the samples for adventureworks for MSSQL2005. I setup the shop front. The web site is up. But when I try to register a new user via the web page I get this error.
Specified cast is not valid.
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.InvalidCastException: Specified cast is not valid.
Source Error:
Line 501:
Line 502: // Calculate the CustomerID using Output Param from SPROC
Line 503: int customerId = (int)parameterCustomerID.Value;
Line 504:
Line 505: return customerId.ToString(CultureInfo.InvariantCulture);
Source File: C:\Program Files\Microsoft SQL Server\90\Samples\Integrated Samples\Storefront\CS\StoreClientComponents\Custom ersDB.cs Line: 503
Stack Trace:
[InvalidCastException: Specified cast is not valid.]
Microsoft.Samples.SqlServer.CustomersDB.AddCustome r(String firstName, String lastName, String email, String password) in C:\Program Files\Microsoft SQL Server\90\Samples\Integrated Samples\Storefront\CS\StoreClientComponents\Custom ersDB.cs:503
Microsoft.Samples.SqlServer.Register.RegisterButto n_Click(Object sender, ImageClickEventArgs e) in c:\Program Files\Microsoft SQL Server\90\Samples\Integrated Samples\Storefront\CS\StoreCSVS\Register.aspx.cs:7 2
System.Web.UI.ImageClickEventHandler.Invoke(Object sender, ImageClickEventArgs e) +0
System.Web.UI.WebControls.ImageButton.OnClick(Imag eClickEventArgs e) +105
System.Web.UI.WebControls.ImageButton.RaisePostBac kEvent(String eventArgument) +115
System.Web.UI.WebControls.ImageButton.System.Web.U I.IPostBackEventHandler.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
I don't have enough experience to know why line 503 is a problem and I'm not sure how to trouble shoot (sorry I'm new to this).
Has anyone had issues with this or can help?
Thanks
Ken :)