2

I have a WCF REST service. Now the question is how can I secure my REST service so no one can use/call it? and what would be the best way to call it (e.g. using jquery, or from code behind)? the client application is on MVC 3.

please help and advise

Many Thanks

user384080
  • 4,576
  • 15
  • 64
  • 96
  • +1 if someone can just answer how to prevent someone from manually calling it that would be great. There are tons of posts out here on complex security situations, SSL etc. A brief idea of how the stackoverflow API works would be nice? They have an apikey param thats on every url call right? How would this be implemented. – gideon Mar 18 '11 at 05:39
  • so what would be the best solution? – user384080 Mar 18 '11 at 06:10

1 Answers1

2

Not sure if you're still looking for a solution. But I used WCFRESTContrib as a basis for my project for the security features, among other things. It's very easy to setup Basic Authentication on the entire service, or on an individual basis for each service method. They have a full description on it here. If you don't decide to use the project, it should at least give you a good understanding on how it works with WCF REST api's.

Precious Roy
  • 1,086
  • 1
  • 9
  • 19