Exception while trying to execute AsyncOperationId: The request failed with HTTP status 401: Unauthorized.

This error message appears when you are trying to import a file but something is going wrong. There are multiple reasons for this error message to show up. Some reasons which I found on the web include:

- See if the account that your Asynchronous Service runs under can authenticate with your SQL Server Service.
- If you're using multiple servers, look at something called a Service Principal Name (or SPN) which is required when you are running the SQL Server service under a non-local system account. This is required so that the SQL Server service account can allow clients to identify and authenticate the service using Kerberos authentication.
- Check if there is an "&" in the file name
- On Windows 2008 with IFD this might be the cause: http://support.microsoft.com/kb/950100.
- Make sure your FriendlyName and UniqueName is the same. See more info on
this here.
- In the DeploymentProperties table in the MSCRM_CONFIG database check the following settings: 'AsyncSdkRootDomain', 'ADSdkRootDomain' and 'ADWebApplicationRootDomain'

All of these didn't help me solve my issue. Apparently somehow the security settings within IIS have been changed. Since this is an IFD deployment, I did expect the anonymous access to be true, but apparently also basic authentication was set instead of windows integrated security. This has been done on the folder MSCRMServices within IISManager, but this can be the case on only the folder 2007 or even the CrmService.asmx file as well.

I hope this helps you solve your issue as well!

Ronald

Complete traced error message:


at AsyncOperationCommand.Execute(AsyncEvent asyncEvent)
at AsyncHostHandler.Handle(AsyncEvent asyncEvent)
at PoolHandler.ProcessAsyncEvent(AsyncEvent asyncEvent)
at PoolHandler.InvokeHandlerInPool(Object state)
at _ThreadPoolWaitCallback.WaitCallback_Context(Object state)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at _ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
at _ThreadPoolWaitCallback.PerformWaitCallback(Object state)
>Exception while trying to execute AsyncOperationId: {5DF1A151-3499-DE11-AD3D-4EF819DD5612} AsyncOperationType: 10 - System.Net.WebException: The request failed with HTTP status 401: Unauthorized.
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.Crm.SdkTypeProxy.CrmService.Execute(Request Request)
at Microsoft.Crm.Asynchronous.SdkTypeProxyCrmServiceWrapper.Execute(Object request)
at Microsoft.Crm.Workflow.WorkflowContext.IsCrmUIWorkflow(Guid activationId)
at Microsoft.Crm.Asynchronous.WorkflowOperation.InternalExecute(AsyncEvent asyncEvent)
at Microsoft.Crm.Asynchronous.AsyncOperationCommand.Execute(AsyncEvent asyncEvent)