0

Masters,

I am new to WCF but aware about Web API's [Authorize] attribute. Same i want to duplicate for WCF REST basic authentication service, Expecting as the security header will pass in every subsequent request once authenticated.

We target to make Restful service using webHttpBinding. Please provide any relevant example to achieve this. Also we target to run same on Https then.

Things seems much simpler in Web API but not in WCF. I googled and get some answers like Something like an operation filter in WCF REST?

Can anybody give me simpler way to achieve this very straight forward as we do in Web API.

Thanks.

Community
  • 1
  • 1
Dipal Mehta
  • 440
  • 6
  • 20

1 Answers1

-1

There's some nice article and projects for activating authentication in WCF:

http://blogs.msdn.com/b/pedram/archive/2007/10/05/wcf-authentication-custom-username-and-password-validator.aspx

http://www.codeproject.com/Articles/36289/8-steps-to-enable-windows-authentication-on-WCF-Ba

And then: http://msdn.microsoft.com/en-us/library/bb398990.aspx

Edit:
See this article: Custom Basic Authentication for RESTful services

Hope helps.

Afshin Mehrabani
  • 33,262
  • 29
  • 136
  • 201
  • We target to make Restful service using webHttpBinding. Please provide any relevant example to achieve this. Also we target to run same on Https then. – Dipal Mehta Jan 17 '13 at 07:34
  • 1
    Thanks Afshin Mehrabani for your quick response. According to suggested post, WCF does not support BasicAuthentication directly. We need to authenticate request before sending it to WCF by any other way. But what if i wish to create a Decorative filters for service which doesnot required authentication. – Dipal Mehta Jan 17 '13 at 08:17
  • None work with REST and why it is accepted as answer...my issue.. can you help... https://stackoverflow.com/questions/54542109/wcf-rest-client-windows-authentication – Ziggler Feb 12 '19 at 00:35