c# - CRM Plugin to Call External Webservice -
We are on CRM 2013 on the basis and we are writing plugins to call external webservice. Webservice is using WSHttpBinding. Basically this plugin will be called in the CRM during account creation, then pass the information into the webservice.
Here is my code:
var binding = new WSHttpBinding (SecurityMode.None); //binding.Security.Mode = WSDualHttpSecurityMode.None; Binding MaxServiceSizes = 2147483647; Binding. Maxbepherpool Size = 2147483647; Binding.Sendimatize = TimespanFarmMinets (3); Binding Reception Timeout = Timespan Sending minutes (3); Binding Opentimeout = timespan.farmminets (3); Binding. Close timefam = timespan From Minutes (3); Binding. Security. Transportation Client Credential Type = HTTP Client Credential Type; Binding. Security. Message.stistibus securecontax = wrong; Binding. Security. Transport. Proxy Credential Type = HTTPProxy Credential Type.No; //binding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName; Var Address = New Endpoint Address (EA); ChannelFactory & LT; IPropertyServiceChannel & gt; Factory = new channel factory & lt; IPPrint serviceCranal & gt; (Binding, address); IPprotestiVirch Channel Channel = Factory. Cutlet (); (Var Proxy = Use new properties (binding, address) {var tid = new Tid {Dtid = "dMaster", Ptid = "pMain"}; var newProp = new property setup {// setup data}; proxy.CreateProperty ( NewProp); // This is not working below or ... // channel.creathproperty (newpop); // This // channel is not working. Close (); < P> However, I'm getting an error message: "The message could not be processed. It is most likely because the action is incorrect or because the message There is a mismatch between an invalid or expired security context token or because of the binding. The security reference token will be invalid if the channel was aborted due to inactivity in service. Termination of service to terminate the inactive sessions Extend the time limit on point binding of time. " Any suggestion is greatly appreciated TIA
Comments
Post a Comment