I am having problem with my WCF (which has client and server certificates)
Exception:
System.ServiceModel.ServiceActivationException:
The requested service,
‘http://localhost/CustomerServiceSite/Customer.svc‘
could not be activated. See the
server’s diagnostic trace logs for
more information..
Error Stack trace:
DoNegotiation(TimeSpan timeout)
System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan
timeout)
System.ServiceModel.Security.TlsnegoTokenProvider.OnOpen(TimeSpan
timeout)
System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan
timeout)
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan
timeout)
System.ServiceModel.Security.CommunicationObjectSecurityTokenProvider.Open(TimeSpan
timeout)
System.ServiceModel.Security.SecurityUtils.OpenTokenProviderIfRequired(SecurityTokenProvider
tokenProvider, TimeSpan timeout)
System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan
timeout)
System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan
timeout)
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan
timeout) OnOpen(TimeSpan timeout)
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan
timeout)
System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.DoOperation(SecuritySessionOperation
operation, EndpointAddress target, Uri
via, SecurityToken currentToken,
TimeSpan timeout)
System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.GetTokenCore(TimeSpan
timeout)
System.IdentityModel.Selectors.SecurityTokenProvider.GetToken(TimeSpan
timeout)
ClientSecuritySessionChannel.OnOpen(TimeSpan
timeout)
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan
timeout)
System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan
timeout)
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan
timeout)
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)
System.ServiceModel.ICommunicationObject.Open(TimeSpan
timeout)
System.ServiceModel.ICommunicationObject.Open(TimeSpan
timeout) Open()
Dignostics settings (inside system.serviceModel)
<diagnostics>
<messageLogging logEntireMessage="true" logMalformedMessages="true"
logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" />
</diagnostics>
Where can I see diagnostics errors? Someone know what could be the problem?
That configuration won’t be sufficient for logging those error messages.
What you need is two-fold – first the part inside
<system.serviceModel>that you already have, to instruct WCF to do logging.But you also need a second part – inside
<system.diagnostics>– to define where to log that information to! Something like this:There are a few different log listeners defined in the
System.Diagnosticsnamespace – this one here will be logging the information to a XML-based*.svclogfile, which you can then view and analyze using the Service Trace Viewer Tool.Read more about Configure Message Logging on MSDN.