When you execute a plug-in on a nondefault organization instance in Microsoft Dynamics CRM 4.0, you receive the following error message if the organization-friendly name contains spaces:
The request failed with HTTP status 401 unauthorized
Additionally, an error message that resembles the following error message is logged in the Application log:
Event Type: Error Event Source: MSCRMWebService Event Category: None Event ID: 18176 Date: 01/01/2008 Time: 0:00:00 AM User: N/A Computer: Computer_name Description: The following information is part of the event: 00000001-0001-0001-0001-000000000001, 00000002-0002-0002-0002-000000000002, account, 50, Create, AccountCreatePlugin.AccountCreatePlugin, AccountCreatePlugin, Version=184.108.40.206, Culture=neutral, PublicKeyToken=GUID, AccountCreatePlugin.AccountCreatePlugin, Unhandled Exception: System.Net.WebException: The request failed with HTTP status 401: Unauthorized. at Microsoft.Crm.Extensibility.SdkTypeProxyCrmServiceWrapper.InternalInvoke(MethodInfo methodInfo, Object parameters) at Microsoft.Crm.Extensibility.SdkTypeProxyCrmServiceWrapper.Create(BusinessEntity entity) at AccountCreatePlugin.AccountCreatePlugin.Execute(IPluginExecutionContext context) at Microsoft.Crm.Extensibility.PluginStep.Execute(PipelineExecutionContext context)
Note In this error message, GUID is a placeholder for the actual GUID. For example, the actual GUID may be 17756f9020864bc8.
This problem is fixed in the latest cumulative update rollup for Microsoft Dynamics CRM 4.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
949256 Microsoft Dynamics CRM 4.0 updates and hotfixes
To work around this problem, use Deployment Manager to change the name of the organization so that the display name of the organization does not contain blank spaces. To do this, follow these steps:
Open Deployment Manager.
Disable the organization in Deployment Manager. To do this, click Organizations, right-click the organization, and then click Disable.
Edit the display name in the Edit Organization Wizard. To open the Edit Organization Wizard, right-click the organization, and then click Edit Organization.
Note To make sure that you use the correct organization name, copy the value in the Name field of the wizard, and then paste the name in the Display name field.
Follow steps in the Edit Organization Wizard, click Apply, and then click Finish.
Enable the organization.
Reset Internet Information Services (IIS).
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
For more information about the terminology that is used to describe Microsoft software updates, click the following article numbers to view the articles in the Microsoft Knowledge Base:
824684Description of the standard terminology that is used to describe Microsoft software updates
887283 Microsoft Business Solutions CRM software hotfix and update package naming standards