Trying to implement a WCF service on an app server (IIS7 with WAS / AppFabric) using netTcpBinding endpoints within the intranet with impersonation enabled. I am getting the following error:
The contract operation 'Create' requires Windows identity for automatic impersonation. A Windows identity that represents the caller is not provided by binding ('NetTcpBinding','http://tempuri.org/') for contract ('IWcfPortal','http://ws.lhotka.net/WcfDataPortal'.
I've looked at the WASHost example project, as well as the Authentication/Windows example project. But neither shows an example of both Win authentication and TcpBinding at the same time.
Am I missing something in the web.config file on the server that could cause this? If I set impersonateCallerForAllOperations to false I don't get the exception. But I would imagine this wouldn't impersonate correctly...is that right? Thanks.
Are you setting the credentials in the client-side WCF proxy (your WcfProxy subclass)? The Windows authentication example from the ebook should show how that's done.
That must be it. I assume you're referring to the following code. That makes sense why impersonation is still working then even though I don't have it in the wcf config settings. Thanks.
factory.Credentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
Copyright (c) Marimer LLC