The code runs fine if you try to create catalog using commerce server runtime.
|
CatalogContext catalogContext = BaseCatalog baseCatalog = |
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.
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. |
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.
If you like this post, please click on our sponsor advertisement.

Hello,
Just came across your blog entry and wanted to mention that the CreateCatalogAuthorizationStore.exe will also add in the entry for you.
Thanks,
Finbar
Thanks Ryan for pointing me to the tool.