Quantcast
Channel: Discussion Forum > Connect Data Services
Viewing all articles
Browse latest Browse all 2504

Session Authentication/RunAnalyticsReport error (3 Comments)

$
0
0

Topic by Jared

I'm getting this error:

System.ServiceModel.FaultException: Active session required. Cannot find in the security header

using Session Authentication with RunAnalyticsReport

This is my connection code:

String url = _globalContext.GetInterfaceServiceUrl(ConnectServiceType.Soap);
EndpointAddress endPointAddr = new EndpointAddress(url);
BasicHttpBinding binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportWithMessageCredential);
binding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName;
binding.MaxReceivedMessageSize = 1024 * 1024;
binding.MaxBufferSize = 1024 * 1024;
binding.MessageEncoding = WSMessageEncoding.Mtom;
_service = new RightNowSyncPortClient(binding, endPointAddr);
BindingElementCollection elements = _service.Endpoint.Binding.CreateBindingElements();
elements.Find<SecurityBindingElement>().IncludeTimestamp = false;
_service.Endpoint.Binding = new CustomBinding(elements);
_globalContext.PrepareConnectSession(_service.ChannelFactory);

This same code works fine on another site. What is missing here?


Viewing all articles
Browse latest Browse all 2504

Trending Articles