Impersonation is nothing but validating if the client is authorized to request service.
In this case, you can impersonate the client request authorize to access the service.
[OperationBehavior (Impersonation = ImpersonationOption.Allowed )]
public string HelloService(string message)
Impersonation has 3 levels of settings.
Reference books, you may like:Programming WCF Services: Design and Build Maintainable Service-Oriented Systems
WCF Multi-Layer Services Development with Entity Framework, 4th Edition
Learning WCF: A Hands-on Guide
- Allowed : It automatically impersonates the client whenever Windows authentication is used, but it has no effect with other authentication mechanisms.
- Not allowed : This indicates the service should not auto Impersonate
- Required : It ensures windows authentication is used else throw exception
Impersonate all operations:
Impersonation can be allowed for all operation of the service by setting the service Authorization in service behavior section in app.config as shown below.
<serviceAuthorization impersonateCallerForAllOperations="true" />
© 2015, admin. All rights reserved.