mackdoyle

I have just completed an install and configuration of CS2007. I can load the catalog web service in a browser but when I invoke a method I get, "Failed to perform the specified catalog operation because the current user is not authorized to perform it."

I have created the CatalogWebSvc account, given it write permissions on the store xml file, set the CatalogAppPool identity to it, added it to the IIS_WPG, added it to the CatalogAdministrator role in the Catalog Store, and made it db_owner of all the DBs in SQL.

When I run a SQL trace and invoke the method, I get:

EventClass: RPC Completed

ApplicationName: .NET SQLClient Data Provider

LoginName: CatalogWebSvc

Reads:2

The entire 500 error is:

System.Web.Services.Protocols.SoapException: Failed to perform the specified catalog operation because the current user is not authorized to perform it.
Operation = 'View the contents on an inventory catalog'
Scope = 'InventoryCatalog_default' ---> Microsoft.CommerceServer.NotAuthorizedException: Failed to perform the specified catalog operation because the current user is not authorized to perform it.
Operation = 'View the contents on an inventory catalog'
Scope = 'InventoryCatalog_default'
at Microsoft.CommerceServer.Catalog.Internal.InventoryCatalog.GetInventoryCatalogProperties(ExecutionContext executionContext, String inventoryCatalogName, Boolean validatePermissions, Boolean getFromCache)
at Microsoft.CommerceServer.Catalog.Internal.CatalogServerContextBase.GetInventoryCatalog(String catalogName, Boolean getFromCache)
--- 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.GetInventoryCatalog(String catalogName, Boolean getFromCache)
at Microsoft



Re: Commerce Server 2007 Failed to perform the specified catalog operation

michael aird

I would double check the roles you've assigned the CatalogWebSvc user to in the AuthorizationStore. The error message you're getting sounds like it's related to those commerce server permissions.




Re: Commerce Server 2007 Failed to perform the specified catalog operation

mackdoyle

The method I am invoking is GetInventoryCatalog. I have assigned CatalogWebSvc to the CatalogAdministrator and Administrator roles on the CatalogAuthorizationStore.




Re: Commerce Server 2007 Failed to perform the specified catalog operation

mackdoyle

Also, the Health Monitoring Service starts up fine and sets each service into a green state. The user it is running under, CSHealthMonitorSvc, has the same roles and CatalogWebSvc in the CatalogAuhtorizationStore




Re: Commerce Server 2007 Failed to perform the specified catalog operation

Joseph Johnson

Just to double check, have you added the CatalogWebSvc user or the CatalogWebSvc account to the authorization store Adding the CatalogWebSvc account to this authorization store is not going to do much of anything. Your smart client applications are using integrated windows authentication to connect to the web service, so you actually need to go in and add the account of the person using the application to the authorization manager.

Also, there's an inventory administrator role within the CatalogWebService authorization manager store which you could consider adding accounts to, but I think the Administrator role (last role in the list) overrides everything else.






Re: Commerce Server 2007 Failed to perform the specified catalog operation

mackdoyle

I had added the CatalogAdminGroup, which I am a member of, to the Administration roles. Just to test, I added myself to the administration roles in the store but am still getting the same error.




Re: Commerce Server 2007 Failed to perform the specified catalog operation

mackdoyle

I am also receiving this error, which I am assuming is related...
When trying to unpack the StarterSite, I get"...you are not authorized to perform the input operation..." while attempting to import the catalog and inventory catalog.


D:\Program Files\Microsoft Commerce Server 2007\Pup Packages\Starter Site>Sample
dataimport.exe d:\Inetpub\wwwroot\StarterSite
Loading data into site: StarterSite

Connecting to Catalog system: Done.
Connecting to Orders system: Done.
Connecting to Marketing system: Done.
Adding the user TLR\u0065862 to AzMan policy files:
MarketingAuthorizationStore.xml
MarketingSystem
MarketingAdministrator
OrdersAuthorizationStore.xml
OrderSystem
OrdersAdministrator
ProfilesAuthorizationStore.xml
ProfileSystem
ProfileAdministrator
CatalogAuthorizationStore.xml
CatalogandInventorySystem
Administrator
Creating payment methods:
Visa
Mastercard
Discover
American Express
Creating shipping methods:
Ground (5-7 Days)
Second-Day Air
Next-Day Air
Generating encryption keys: Done.
Adding encryption keys to web.config: Done.
Adding encryption keys to web.config for the ProfilesWebService: Done.
Importing catalog:
Warning: The following errors occured during import:
You are not authorized to perform the import operation. Ensure that you have ade
quate permissions to perform the import operation before running this tool.
Done.
Updating Inventory resource:
Importing inventory catalog:
Warning: The following errors occured during import:
You are not authorized to perform the import operation. Ensure that you have ade
quate permissions to perform the import operation before running this tool.
Done.
Unpacking catalog images:

Microsoft (R) Cabinet Tool - Version 5.2.3663.0
Copyright (c) Microsoft Corporation. All rights reserved..




Re: Commerce Server 2007 Failed to perform the specified catalog operation

Vinayak Tadas - MSFT

You need to add the business user (windows user) performing the operation to the Administrator role.

Also check that the web.config in the catalgowebservice directory points to the correct catalogauthorization.xml (the one that you are updating).





Re: Commerce Server 2007 Failed to perform the specified catalog operation

mackdoyle

Thanks Vinayak.
I have checked and the web conig file is pointing to the corrrect auth store. My setup looks like this:
web.config: D:\Inetpub\wwwroot\CatalogWebService\web.config
auth file: D:\Inetpub\wwwroot\CatalogWebService\CatalogAuthorizationStore.xml
path in config: authorizationPolicyPath="CatalogAuthorizationStore.xml"

Also, I am logging in as myself and I have added myself to the CatalogAdministrator, InventoryAdministrator, and Administrator roles on Azman.




Re: Commerce Server 2007 Failed to perform the specified catalog operation

mackdoyle

Success!

Ok, with the help of Microsoft support, I got this issued resolved. In my IIS Authentication Methods, I had 'Enable anonymous access' and 'Integrated Windows authentication' checked and only the latter should be. So it was using the anonymous account. I believe the Commerce Server Configuration Wizard sets this up, so if other people start having this issue, that will need to be fixed.

 

Once you make this change, you will need to unpack your site again. A common symptom of this, in relation to the catalog, is having all of the buttons in the Catalog Manager disabled.