I've set up a basic http WCF Service and my application in IIS is configured to use Windows Authentication.
The bindings therefore have the following security settings:
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" proxyCredentialType="None" />
<message clientCredentialType="Certificate"/>
</security>
Each operation contract has the following attribute
[PrincipalPermission(SecurityAction.Demand, Authenticated = true)]
and the service class has the following attribute to allow asp compability
[AspNetCompatibilityRequirements(RequirementsMode =
AspNetCompatibilityRequirementsMode.Allowed)]
The Windows authentication is passed to the WCF service properly, since I can see/generate the WSDL. However, when I call an operation in my WCF service i get the following error:
[FaultException`1: There was an error generating the XML document.]
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,
IMessage retMsg) +4767763
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData,
Int32 type) +1725
XXXX.Service() +0
XXXX.Service() +329
XXXX.Service() +747
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o,
Object t,EventArgs e) +25
System.Web.UI.Control.LoadRecursive() +71
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint) +3048
It's not the first time i see the error There was an error generating the XML document., I want to know what could be the reason for this? Does the Service send the data somewhat encrypted and the client doesn't understand it because it is miss-configured?