Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: Commerce Server 2002 ASP.NET Sites Return an InvalidCastException Error


View products that this article applies to.

Symptoms

When Commerce Server reads values from the OrderForm object, you may receive an ASP.NET exception error message. The following is an example of this exception:
General Information

Additonal Info:
ExceptionManager.MachineName: BIZDESK1
ExceptionManager.TimeStamp: 8/8/2003 7:03:20 PM
ExceptionManager.FullName: GenerealResources, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6dc7d4f4c5257af7
ExceptionManager.AppDomainName: /LM/w3svc/2/Root/Commerce-8-169268694359+28122
ExceptionManager.ThreadIdentity:
ExceptionManager.WindowsIdentity: MICROSOFT\aspnetwebservice

Exception Information
Microsoft.CommerceServer.Runtime.Orders.CommerceOrderSystemException: Failed to retrieve value for property 'sku' from the order form. ---> Microsoft.CommerceServer.Runtime.CommerceException: GetOrderFormValue Failed. ---> System.InvalidCastException: QueryInterface for interface ITypeInfo failed.
at Microsoft.VisualBasic.CompilerServices.ITypeInfo.GetDocumentation(Int32 memid, String& pBstrName, String& pBstrDocString, Int32& pdwHelpContext, String& pBstrHelpFile)
at Microsoft.VisualBasic.Information.TypeName(Object VarName)
at Microsoft.CommerceServer.Internal.Common.Util.IsBlank(Object& arg)
at Microsoft.CommerceServer.Interop.Orders.OrderGroupFreeThreaded.GetOrderFormValue(String strKey, Object strOrderFormName)
--- End of inner exception stack trace ---
at Microsoft.CommerceServer.Internal.Common.Util.ThrowCommerceException(String message, Exception inner, String source)
at Microsoft.CommerceServer.Interop.Orders.OrderGroupFreeThreaded.GetOrderFormValue(String strKey, Object strOrderFormName)
at Microsoft.CommerceServer.Runtime.Orders.OrderForm.get_Item(String keyName)
--- End of inner exception stack trace ---
at Microsoft.CommerceServer.Runtime.Orders.OrderForm.get_Item(String keyName)
at GeneralPayment.GeneralPayment.PayInCreditCard(String userId, String language, Int32 creditChecked, Int32 numOfPayment, String m_cc_number, String m_exp_date, Int32 m_cc_company, String generalStoreName, String m_userId, String m_Cvv, Int32 matbea)

Exception Message
Failed to retrieve value for property 'sku' from the order form.

Exception InnerException
Microsoft.CommerceServer.Runtime.CommerceException: GetOrderFormValue Failed. ---> System.InvalidCastException: QueryInterface for interface ITypeInfo failed.
at Microsoft.VisualBasic.CompilerServices.ITypeInfo.GetDocumentation(Int32 memid, String& pBstrName, String& pBstrDocString, Int32& pdwHelpContext, String& pBstrHelpFile)
at Microsoft.VisualBasic.Information.TypeName(Object VarName)
at Microsoft.CommerceServer.Internal.Common.Util.IsBlank(Object& arg)
at Microsoft.CommerceServer.Interop.Orders.OrderGroupFreeThreaded.GetOrderFormValue(String strKey, Object strOrderFormName)
--- End of inner exception stack trace ---
at Microsoft.CommerceServer.Internal.Common.Util.ThrowCommerceException(String message, Exception inner, String source)
at Microsoft.CommerceServer.Interop.Orders.OrderGroupFreeThreaded.GetOrderFormValue(String strKey, Object strOrderFormName)
at Microsoft.CommerceServer.Runtime.Orders.OrderForm.get_Item(String keyName)

↑ Back to the top


Resolution

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site: Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

The English version of this hotfix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date         Time   Version     Size    File name
   -----------------------------------------------------------------------------------------------
   28-Aug-2003  16:22  4.5.3325.0  98,304  Microsoft.commerceserver.interop.orders.requisition.dll
   28-Aug-2003  16:22  4.5.3325.0  61,440  Microsoft.commerceserver.runtime.shipmgr.dll
After you apply this hotfix, you must run Gacutil -if on each of the binaries to put them in the global assembly cache (GAC).

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

↑ Back to the top


Keywords: KB827872, kbbug, kbfix, kberrmsg, kbqfe, kbhotfixserver, kbqfe, kbhotfixserver, kbautohotfix

↑ Back to the top

Article Info
Article ID : 827872
Revision : 8
Created on : 11/15/2007
Published on : 11/15/2007
Exists online : False
Views : 341