wcf - How to authenticate to Dynamics CRM 365 SOAP endpoint using service reference -
i'm trying, project, connect dynamics crm 365 soap endpoint, using service reference instead of sdk (because of reason, long explain them).
thus added service reference, cannot authenticate soap endpoint, following exception :
message: system.aggregateexception : une ou plusieurs erreurs se sont produites. ----> system.servicemodel.faultexception : error occurred when verifying security message.
this caused because don't have yet correct authentication code in app.config, explained in autogenerated file content, cannot find on web how it.
autogenerated app.config :
<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.servicemodel> <bindings> <custombinding> <binding name="custombinding_iorganizationservice"> <!--the configuration schema insufficient describe non-standard configuration of following security binding element: --> <!--system.servicemodel.channels.transportsecuritybindingelement: defaultalgorithmsuite: tripledes includetimestamp: true keyentropymode: combinedentropy messagesecurityversion: wssecurity11wstrust13wssecureconversation13wssecuritypolicy12basicsecurityprofile10 securityheaderlayout: strict protecttokens: false endpointsupportingtokenparameters: no endorsing tokens. signed[0] system.servicemodel.security.tokens.issuedsecuritytokenparameters: inclusionmode: alwaystorecipient referencestyle: internal requirederivedkeys: false tokentype: null keytype: symmetrickey keysize: 192 issueraddress: https://login.microsoftonline.com/rst2.srf issuermetadataaddress: https://login.windows.net/common/wsfed/mex defaultmessgesecurityversion: null usestrtransform: false issuerbinding: null claimtyperequirements: none no signed encrypted tokens. no signed endorsing tokens. optionalendpointsupportingtokenparameters: no endorsing tokens. no signed tokens. no signed encrypted tokens. no signed endorsing tokens. operationsupportingtokenparameters: none optionaloperationsupportingtokenparameters: none--> <textmessageencoding /> <httpstransport /> </binding> </custombinding> </bindings> <client> <endpoint address="https://<org>.api.crm4.dynamics.com/xrmservices/2011/organization.svc" binding="custombinding" bindingconfiguration="custombinding_iorganizationservice" contract="crm.iorganizationservice" name="custombinding_iorganizationservice" /> </client> </system.servicemodel> </configuration>
Comments
Post a Comment