Last post May 09, 2005 05:42 PM by leesob
May 03, 2005 05:38 PM|leesob|LINK
I'm trying to deploy a copy of the Commerce Starter kit but keep getting 'Specified Cast not valid' error when I attempt to select a specific product.
[InvalidCastException: Specified cast is not valid.]
ASPNET.StarterKit.Commerce.ProductsDB.GetProductDetails(Int32 productID) in c:\program files\asp.net starter kits\asp.net commerce (csvs)\commercecsvs\components\productsdb.cs:172
ASPNET.StarterKit.Commerce.ProductDetailsPage.Page_Load(Object sender, EventArgs e) in C:\Program Files\ASP.NET Starter Kits\ASP.NET Commerce (CSVS)\CommerceCSVS\ProductDetails.aspx.cs:48
System.Web.UI.Control.OnLoad(EventArgs e) +67
This error seems to be because the GetProductDetails stored procedure returns NULL for all the output parameters. Yet if I execute the stored procedure from enterprise manager I can replicate the NULL return for the output parameters even tho when I execute
the SQL from the stored procedure with the same input parameter value I get back the expected results. It seems like the output parameter functionality doesn't work on the deployed web server.
This was not a problem when I tested this on my local host. I have verified that this is not a data problem since executing the SQL from the stored procedure returns the expected results.
I've even tried alternative web hosting providers but get the same results. My local host has .NET version 1.1 installed, could this be related to the Web host running a later version of .NET. I thought that by testing the stored procedure via SQL Server Enterprise
Manager I had eliminated this, but perhaps not.
Any ideas ?
May 09, 2005 05:42 PM|leesob|LINK