Commerce Server Blog

Build world class ecommerce applications using Microsoft Commerce Server
  •  
  • Home
  • Advertise
  • Copyright Policy
  • Disclaimer
  • About

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information

ravikanth | August 23, 2010

After getting latest code from TFS, I compiled and installed the latest build assemblies in GAC and from then my commerce server application stopped working. I was getting error “Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information”. The stack trace is shown below.
      

[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]

   System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark) +0

   System.Reflection.Assembly.GetTypes() +205

   Microsoft.CommerceServer.Internal.Orders.Storage.SchemaMapping.LoadAssemblies(TypeDefinition[] typeDefs, MappingResults results) +6473

   Microsoft.CommerceServer.Internal.Orders.Storage.SchemaMapping.ReadMapping(Stream stream, TypeDefinition[] typeDefinitions, MappingResults& outResults) +191

   Microsoft.CommerceServer.Internal.Orders.Storage.SchemaMapping.ReadMapping(String filename, TypeDefinition[] typeDefinitions, MappingResults& outResults) +433

   Microsoft.CommerceServer.Runtime.Orders.OrderContext.CreateSchemaAndPipelineMapping(SchemaMapping& schemaMapping, PipelineAdapter& pipelineAdapter, String appRootPath, CommerceOrdersConfiguration ordersConfiguration) +164

   Microsoft.CommerceServer.Runtime.Orders.OrderContext.Initialize(String transactionResourceConnectionString, String transactionConfigResourceConnectionString) +321

   Microsoft.CommerceServer.Runtime.Orders.OrderContext.Create(String transactionResourceConnectionString, String transactionConfigResourceConnectionString) +161

   Microsoft.CommerceServer.Runtime.Orders.CommerceOrderModule.CreateOrderContext() +90

   Microsoft.CommerceServer.Runtime.Orders.CommerceOrderModule.get_OrderContext() +138

   Microsoft.CommerceServer.Runtime.Orders.CommerceOrderModule.OnBeginRequest(Object sender, EventArgs e) +24

   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80

   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171

  

By seeing the stack trace, we can easily figured out that this error is commerce server (Microsoft.CommerceServer.Runtime) and it may not able to load the assemblies mentioned in the types section in web.config file but the assemblies (runtime and custom assemblies) are already exist in GAC. I binged, but not able to find concrete solution as this error is not specific to commerce server. I checked commerce server web services and found they are working fine and came to narrow conclusion that this error is due to some of the application code (not Commerce server assemblies).

Finally, I uninstall all application assemblies from GAC, does fresh compilation (rebuild) and put the new assemblies in GAC which has fixed this error (I have done machine restart due to some other issue).  This looks strange but I felt that one of the assembly might of not compiled properly nor got register in GAC properly which has triggered this error.  So, if you are getting same error in commerce then do the same way and hopes this will fix the issue.

Comments
No Comments »
Categories
What's New
Comments rss Comments rss
Trackback Trackback

Commerce server staging throws Remote authorization failed to server. Ensure the service has access to this server.

ravikanth | August 9, 2010

After periodic password update to our application service account, the staging environment stopped working. When I right click and start the project, the process keeps on aborting and in the event log, I am getting “Remote authorization failed to server hl-stage-web. Ensure the service has access to this server.” error.

With the error description, I can easily understand that the account on the source machine could not log onto the target machine but the same account is running in all environments (WIP, pre production and production environment). To temporary fix this issue, I have right clicked on the project, select properties. Click on destination server and press edit button. In the dialog box, I have explicitly provided the user name and password (as shown below). Once done, the staging service start working properly.

image

Later I found the root cause:  If the account user names are the same on both ends, then the passwords do not match or the account on the target does not have sufficient permissions. It may also be that the domain/server managing  logons for that remote domain is not responding. The recommendation is to ensure that security is set up correctly between the two machines and that the domain on the target end can validate logons.

Comments
No Comments »
Categories
Commerce Server 2009, commerce server 2007
Tags
Stating
Comments rss Comments rss
Trackback Trackback

Updated Commerce Server 2009 template pack for SharePoint 2007 released

ravikanth | August 2, 2010

Last week, Microsoft has released updated commerce server 2009 template pack for SharePoint 2007. This kit includes contemporary shopping Web site’s web parts and controllers source code, providing flexibility to the developers to extend out of box web sites to meet their needs. Here are the few updates to the template pack.

  • Setup_ExtensKit.exe includes the source code for the associated Web Parts in an extensibility kit. You can use Visual Studio 2008 to develop with the extensibility kit and customize the contemporary shopping Web site. Please see Extensibility_Kit_for_CS2009_Template_Pack_for_2007.doc for more details.
  • Additional details have been added to the section “Using the Correct Login Page” in the file CS09TemplatePackGuide.doc.

Note: To use the Template Pack you require Commerce Server 2009 installed and configured, including the Default Site in Windows SharePoint Server 3.0 (WSS) or Microsoft Office SharePoint Server 2007 (MOSS).

Click here to download the extensibility kit.

If you are not aware of how to extend extensibility kit then my recommendation is to go through below blog url.

http://blogs.msdn.com/b/commerce/archive/2010/04/21/using-microsoft-commerce-server-2009-web-part-extensibility-kit-for-sharepoint-2007-effectively.aspx

Comments
No Comments »
Categories
What's New
Tags
template pack
Comments rss Comments rss
Trackback Trackback

RCXml2Resx.exe tool stops working

ravikanth | July 21, 2010

Commerce server Message manager provides us to manage localized message handling. We have to follow series of steps to covert the messages to satellite assemblies. So, here are the steps we should follow.

1. Create and modify RC.XML and include your localized text and languages (you can find in %Commerce_Server_Root%\Sdk\Samples\MessageManager folder).

2. Use RCxml2Resx.exe tool to covert RC.XML file into resx file. ( You can find it %Commerce_Server_Root%\Tools folder.) The input for this tool is rc.xml file.

3. Create resources file using Resource File Generator (ResGen.exe).

4. Generate satellite assemblies by using Assembly Linker (Al.exe) command-line tools.

After adding few languages (actually I added 32 languages to the xml file), when I run RCXmlResx.exe file, you can encounter problem and tools exits with an exception (as shown below) and nothing is written in the event log.

clip_image002

I checked many places but the solution is not found. After troubleshooting further, I found this error is due to following mistakes.

  1. I used wrong locale code . Instead of “<Language Name="en-ZA" Locale="7177" />”, I kept “<Language Name="en-ZA" Locale="71777" />”.
  2. I have added wrong language locale code (in my instance, I have added “<Language Name="en-AE" Locale="1033" />”).
  3. If the language value doesn’t exists but a value (message) exists in <Entry> tags.

Note: The messages language value under <Entry> tags need not be in a sequence.

Comments
No Comments »
Categories
Commerce Server 2009, commerce server 2007
Tags
Commerce server tools
Comments rss Comments rss
Trackback Trackback

Commerce Server Profile Importer Tool

ravikanth | July 14, 2010

Two years back, I have blogged catalog importer, which will help us to import catalog data into commerce server. I have used this tool in many projects and business users like this tool as it uses excel as input parameter. Recently I see in communities asking for user profile import. User profile has some sensitive information (like password, secret question and answer, etc) and we can’t directly insert these data into database as these data should be encrypted using few algorithms (SHA1, SHA256, MD5, etc) before saving into database.

If your requirement is to import all existing user profiles then the good option is to insert data using commerce server API. I created a tool (simple and robust) which will help you to insert user profile (can extend to save address and other profiles) information in commerce server. The tool is very flexible and extensible without touching the code. Input to this tool is the excel file (sample file in data folder) and couple of constraints with this template are.

  • The work sheet name should be “UserData”.
  • Currently only 5 columns are there but you can extend the list – the column name should be same as commerce server column name. For example, if you want to import telephone number then the column name should be “GeneralInfo.tel_number”.

The code is pretty simple and self explanatory. When you run the tool, you will be prompted for excel file location. After providing the information, the tool loads data into data table and starts inserted data one by one into commerce server. The output of the tool looks like this (I have imported the sample data in the sample template file). Any wrong information in excel will lead to exception.

image

On successful import, if you query “UserObject” table (or other profile tables), you can find imported data.

image

Click here to download the tool.

Comments
No Comments »
Categories
Commerce Server 2009, commerce server 2007
Tags
Profile Importer, tools
Comments rss Comments rss
Trackback Trackback

« Previous Entries Next Entries »

Sign up for Newsletter


Categories

Quiz

  • Catalog Quiz for Beginners
  • Profile Quiz for Beginners
  • Quiz 1 for Advance Users
  • Quiz for Beginners

Recent Posts

  • Staging Deployment – Security Considerations
  • Pipeline Editor displays registered custom pipeline components as unknown in 64 Bit version.
  • How commerce server staging works
  • Steps to extend payments in Commerce Server 2009
  • Introduction to Commerce Server Staging
  • Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information
  • Commerce server staging throws Remote authorization failed to server. Ensure the service has access to this server.
  • Updated Commerce Server 2009 template pack for SharePoint 2007 released
  • RCXml2Resx.exe tool stops working
  • Commerce Server Profile Importer Tool

Archives

  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008

Tags

add discounts add images to profile Advantages of commerce server approve discounts authentication auto login process automatic user creation basket Brand Management business tools campaign management Catalog catalog import Category commerce server commerce server 2007 commerce server manager Commerce Server SP2 commerce server staging discounts ecommerce Estimation Installation inventory Kanth Koppala marketing system migration error Mojave operation components operation sequence Order subsystem Product profile profile subsystem property metadata purchase order quick checkout Ravi Ravi Kanth site cache refresh starter site tools transactions error Variant
(c) 2009 Commerce Server Blog. All rights Reserved. Articles cannot be reproduced without permission from the author.Write to me at kanth@ravikanth.net if you have any comments, questions, suggestions about this site or would like to send us a tip
About Us | Terms of Use | Disclaimer | Advertise .