Error message when you execute a plug-in on a nondefault organization instance in Microsoft Dynamics CRM 4.0: “The request failed with HTTP status 401 unauthorized”

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=1.0.0.0, 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  (http://support.microsoft.com/kb/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:

1. Open Deployment Manager.
2. Disable the organization in Deployment Manager. To do this, click Organizations, right-click the organization, and then click Disable.
3. 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.

4. Follow steps in the Edit Organization Wizard, click Apply, and then click Finish.
5. Enable the organization.
6.Reset Internet Information Services (IIS).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: