Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to implement custom authentication for all .SVC available in application.

We want to implement WCF services (.svc) - employee.svc and department.svc.
We need to assure that for every operationcontract call in this services the user should be authenticated user.

We need to host this services in IIS 7

We have tried using "System.Web.ApplicationServices.AuthenticationService" in a new AuthenticationService.svc and registering event System.Web.ApplicationServices.AuthenticationService.Authenticating in Global.asax. But this event is called only for
AuthenticationService.svc but not for employee.svc and department.svc

Also, we donot want any CERTIFICATE needs to be installed on the server(or any other application like windows or mobile application) where this service will be hosted.

Also, when the one of operationcontract of service is called it should not ask again for username/password.

Any suggesstion????
Posted

1 solution

XML
Hi,

If I understand you correct you want to use Authorization and Authentication.
Authentication can be implemented as Windows Authentication with active directory.

For Authorization you can use Message inspector.
For more about message inspector you can refer this link.

[<a href="http://msdn.microsoft.com/en-us/library/aa717047.aspx" target="_blank" title="New Window">^</a>]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900