views:

69

answers:

2

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?

+1  A: 

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:

<system.diagnostics>
    <sources>
        <source name="System.ServiceModel.MessageLogging" switchValue="Information, ActivityTracing">
           <listeners>
             <add name="messages"
             type="System.Diagnostics.XmlWriterTraceListener"
             initializeData="c:\logs\messages.svclog" />
          </listeners>
        </source>
    </sources>
    <trace autoflush="true" />
</system.diagnostics>

There are a few different log listeners defined in the System.Diagnostics namespace - this one here will be logging the information to a XML-based *.svclog file, which you can then view and analyze using the Service Trace Viewer Tool.

Read more about Configure Message Logging on MSDN.

marc_s
A: 

Just look in the Applications event log with the Event Viewer application.

John Saunders