I had a problem with a WCF service that I created in that I couldn't access the Metadata Exchange (MEX) endpoint using svcutil to generate my client classes if I ran the site under a special service account. Everything else seemed to work, just the MEX was broken. If I switched the site to use the Network Service account then the MEX would work, but my service would not (since it needed to use the other credentials). I posted my question on the WCF forums and quickly got a response:
as i know,mex binding should not depend on what account host process is running under can you please enable WCF trace(verbose mode) on service side,trace will provide more info about actual error message
as i know,mex binding should not depend on what account host process is running under
can you please enable WCF trace(verbose mode) on service side,trace will provide more info about actual error message
So how do you enable WCF tracing? This page explains is all (note that blog belongs to the person who answered my post). Once I enabled the tracing I saw the following error inside the trace log:
at System.ServiceModel.Description.MetadataSetSerializer.Serialize(Object objectToSerialize, XmlSerializationWriter writer) at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)</StackTrace><ExceptionString>System.InvalidOperationException: Unable to generate a temporary class (result=1).error CS2001: Source file 'C:\WINDOWS\TEMP\6dad3wan.0.cs' could not be founderror CS2008: No inputs specified
Oopps! I forgot to grant access to the c:\windows\temp folder to the service account. Once I did that everything worked great!
So if you're trying to troubleshoot a WCF issue, tracing is your friend. :)
Technorati Tags: WCF