Unable to edit details in Dynamics CRM 2013 Outlook Client

Today I was working on Dynamics CRM 2013 Outlook Client in my test environment and tried opening a record for editing by double-clicking on the list view. As expected, I wanted to open the record but I observed that after sometime nothing happened. I performed the same action again and this time, I was certainly not expecting the same behaviour. However, I observed that this time again, record failed to load; there was no window opened for the record. I performed the same activity a couple of more times, but, every time it behaved the same.

I thought, I had enough and I wanted to drill down further to know what is happening here. I went ahead and looked into the basic settings/configurations on IE, i.e. adding the CRM URL to the trusted site, closing and reopening outlook client, tried with a different user but it still yielded the same result. By now, I was becoming impatient about the issue and thought of capturing some logs. I enabled the Dynamics CRM client trace, CRM Server trace and also captured the Fiddler to know what is happening at the backend.

I could then see the following errors in the client trace:

Exception occurred when authenticating with serverType: Remote Exception: System.InvalidOperationException: Metadata contains a reference that cannot be resolved:

System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Description.MetadataExchangeClient.MetadataLocationRetriever.DownloadMetadata(TimeoutHelper timeoutHelper)
at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)
--- End of inner exception stack trace ---
at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)
at System.ServiceModel.Description.MetadataExchangeClient.ResolveNext(ResolveCallState resolveCallState)
at System.ServiceModel.Description.MetadataExchangeClient.GetMetadata(MetadataRetriever retriever)
at System.ServiceModel.Description.MetadataExchangeClient.GetMetadata(Uri address, MetadataExchangeClientMode mode)
at Microsoft.Xrm.Sdk.Client.ServiceMetadataUtility.RetrieveServiceEndpointMetadata(Type contractType, Uri serviceUri, Boolean checkForSecondary)
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1..ctor(Uri serviceUri, Boolean checkForSecondary)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceConfiguration..ctor(Uri serviceUri)
at Microsoft.Xrm.Sdk.Client.ServiceConfigurationFactory.CreateConfiguration[TService](Uri serviceUri)
at Microsoft.Crm.Outlook.ClientAuth.ClientAuthProvidersFactory`1.GetAuthProvider(Uri endPoint, Credential credentials, AuthUIMode uiMode, Uri webEndPoint, IClientOrganizationContext context, Form parentWindow)
at Microsoft.Crm.Application.SMWrappers.ClientOrganizationContextFactory.ClientOrganizationContext.Authenticate(CrmServerType serverType)

Based on the error, I could understand that the main issue has something to do with Proxy. Hence, I disabled the proxy and it fixed the issue.

However,I wanted to research further on this and during investigation, I came across a Microsoft KB Article: 953890 which could help me understand the issue and also fix it.

I thought of writing this blog post sharing my experience and also to help others who might face the same issue.