Hello,
I have created one asp.net web site to communicate CRM 2013 online. Below is the code i am using
// Get Organization service
ClientCredentials cre = new ClientCredentials();
cre.UserName.UserName = Username;
cre.UserName.Password = Password;
Uri serviceUri = new Uri(Url);
OrganizationServiceProxy proxy = new OrganizationServiceProxy(serviceUri, null, cre, null);
IOrganizationService service = proxy.EnableProxyTypes();
// Add entry in broker custom entity
Entity ent = new Entity("new_brokercorrespon");
ent.Attributes["new_name"] = "test";
service.Create(ent);
The full code is working fine on my local computer (windows 7 PC) and our development server (windows 2012 server ) but it throw exception on our client server (windows 2003 server ). Is it because CRM 2013 sdk not support in windows 2003 server?
I have debug the problem and come to know that the code above the "//Add entry in broker custom entity" working fine and the error thrown by rest of the code.
Below is the exception i got
------ Error --------
An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. System.ServiceModel.FaultException: An error occurred when verifying security for the message. Server stack trace: at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.ProcessReply(Message reply, SecurityProtocolCorrelationState correlationState, TimeSpan timeout) at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Dispatcher.RequestChannelBinder.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.Create(Entity entity) at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.CreateCore(Entity entity) at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.Create(Entity entity) at CRMWebApplication.BrokerDetail.AddBroker(Broker broker)
------------------
Can anyone help me to come out the problem?
Thanks & Regards
Bhumit Patel