The code runs fine if you try to create catalog using commerce server runtime.

CatalogContext catalogContext =
CommerceContext.Current.CatalogSystem;

BaseCatalog baseCatalog =
catalogContext.CreateBaseCatalog("Books", "productId", string.Empty, "en-us", "en-us");

You can able to see the newly created catalog in the catalog manager but when you try to expand it then you will receive following error.

image

It looks wired as I don’t have any issues in accessing the newly created catalog through runtime and only faces this issue when try to accesses through catalog manager.

When I observed event log, I saw following error.

Microsoft.CommerceServer.ServerFaultException: Failed to retrieve the AzMan Scope named CatalogScope_Books. —> System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Failed to retrieve the AzMan Scope named CatalogScope_Books. —> Microsoft.CommerceServer.ServerFaultException: Failed to retrieve the AzMan Scope named CatalogScope_Books.
   — End of inner exception stack trace —
   at Microsoft.CommerceServer.Catalog.Internal.WebServiceUtility. PropagateOrLogException(Exception except)
   at Microsoft.CommerceServer.Catalog.WebService.CatalogWebService. PropagateOrLogException(Exception except)
   at Microsoft.CommerceServer.Catalog.Internal.CatalogServerContextBase. GetCategory(String catalogName, String categoryName, String language, CategoryConfiguration config, Boolean getFromCache, Nullable`1 isVirtualCatalog, Nullable`1 validateLanguage)
   at Microsoft.CommerceServer.Catalog.Internal.CatalogServerContextBase. GetCategory(String catalogName, String categoryName, String language, CategoryConfiguration config)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at Microsoft.CommerceServer.Catalog.WebService.Proxies.CatalogWebService. AuthorizedInvoke(String methodName, Object[] parameters)
   — End of inner exception stack trace —

This error is due to authorization. While creating catalog through business tools, catalog manger takes care of writing entries into catalog authorization store but if we are creating using runtime API then we have to create entries manually into authorization store.

Follow below steps to fix this problem.

  • Open CatalogAuthorizationStore.xml file in Authorization manager.
  • Right click on “CatalogandInventorySystem” and select “New Scope”.
  • Give scope name as “CatalogScope_CatalogName” – In our context it’s “CatalogScope_Books”.
  • Right click on "Task Definitions" and click on "New Task Definition". Click "Add" button and select appropriate tasks & operations.
  • Right click on "Role Defintions" and click on "New Role Definiton". Click "Add" button and select appropriate roles.
  • Right click on "Role Assignments" and click on "New Role Assignment". Select appropriate roles and press OK button.
  • Make sure you add your windows id to the role.

Once the above tasks got completed. You can able to access the catalog through catalog manager.

Note: You have follow similar process whenever you create Inventory Catalog or a Property.

Related Articles


If you like this post, please click on our sponsor advertisement.


2 Responses to “Filed to retrieve the AzMan Scope”

Leave a Reply

Follow me on Google+
Add to circles

In 0 people's circles

Sign up for Newsletter