Quantcast
Viewing all articles
Browse latest Browse all 997

Connection issues between ASP. Net Web Application and MS CRM 2011

We have internet facing Dynamics CRM 2011 deployment on Rollup 18 hosted in Azure. CRM application and ADFS are hosted on separate servers. Also, on another server we host an ASP.Net Web App that connects to the CRM to perform certain tasks. Most of the time it connects fine however, every once in a while it fails to connect with the following errors:

Exception Type: System.InvalidOperationException
>Message: Metadata contains a reference that cannot be resolved: 'https://dev.mydomain.com.au/XRMServices/2011/Discovery.svc?wsdl'.
>Source: System.ServiceModel
>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 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.ServiceConfigurationFactory.CreateConfiguration[TService](Uri serviceUri)
   at ScrimPortalProject.ScrimCrmAdapter.CreateCrmService(Boolean foreceCreation)
   at ScrimPortalProject.ScrimCrmAdapter.LoadAnoncements(ScrimPortal portal)
   at ScrimPortalProject.Login.Page_Load(Object sender, EventArgs e)Inner Exception Type: System.Net.WebException
>Inner Exception: The remote name could not be resolved: 'dev.mydomain.com.au'
>Inner Source: System
>Inner Stack Trace:    at System.Net.HttpWebRequest.GetResponse()
   at System.ServiceModel.Description.MetadataExchangeClient.MetadataLocationRetriever.DownloadMetadata(TimeoutHelper timeoutHelper)
   at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)

Also, another error that we're getting:

Exception Type: System.ServiceModel.CommunicationException
>Message: An error occurred while receiving the HTTP response to https://company.mydomain.com.au/XRMServices/2011/Organization.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.
>Source: mscorlib
>Stack Trace: 
Server stack trace: 
   at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
   at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
   at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Microsoft.Xrm.Sdk.IOrganizationService.RetrieveMultiple(QueryBase query)
   at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.RetrieveMultipleCore(QueryBase query)
   at ScrimPortalProject.ScrimCrmAdapter.LoadAnoncements(ScrimPortal portal)
   at ScrimPortalProject.Login.Page_Load(Object sender, EventArgs e)Inner Exception Type: System.Net.WebException
>Inner Exception: The underlying connection was closed: An unexpected error occurred on a receive.
>Inner Source: System
>Inner Stack Trace:    at System.Net.HttpWebRequest.GetResponse()
   at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)

This issue seem to be pooping up at random. I'cant find any error in the event viewer of any of the servers that could give me a better idea of what's going on.

Any help will be greatly appreciated.


Viewing all articles
Browse latest Browse all 997

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>