Thanks. I'm on CRM 2011 local install. I have two functions on the web service. The first just returns a true value and when I call that function everything seems to work. The second function contains a bunch of db calls, which seems to timeout when the first db call is reached.
I set the plugin to fire using an admin account (me).
I've made a little progress was just able to actually watch the plugin fire the web service. When it reaches the first fucntion that does a db call it returns the following message:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
If I run the web service outside of the plugin no errors are thrown and we get the expected result.
Here is the StackTrace returned from the plugin:
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
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 crmGenerateLicense.LicenseWS.LicenseWebServiceSoap.GetFullLicenseKey(GetFullLicenseKeyRequest request)
at crmGenerateLicense.LicenseWS.LicenseWebServiceSoapClient.crmGenerateLicense.LicenseWS.LicenseWebServiceSoap.GetFullLicenseKey(GetFullLicenseKeyRequest request)
at crmGenerateLicense.LicenseWS.LicenseWebServiceSoapClient.GetFullLicenseKey(String System, String LicenseNumber)
at crmGenerateLicense.AppCode.GenerateLicenseFile(Guid LicenseId, String LicenseNo, String LicenseServiceUrl, String LicSystem, OrganizationServiceContext orgContext, IOrganizationService service)
Here's the latest call I'm using from in the Plugin:
binding.Name = "BasicHttpBinding_Service";
binding.Security.Mode = BasicHttpSecurityMode.None;
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
binding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.None;
binding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName;
binding.SendTimeout = TimeSpan.MaxValue;
binding.ReceiveTimeout = TimeSpan.MaxValue;
binding.CloseTimeout = TimeSpan.MaxValue;
binding.OpenTimeout = TimeSpan.MaxValue;
binding.TransferMode = TransferMode.Streamed;
EndpointAddress address = new EndpointAddress(url);
LicenseWS.LicenseWebServiceSoapClient LicenseSrv = new LicenseWS.LicenseWebServiceSoapClient(binding, address);