Adding basic HTTP auth to a WCF REST service

前端 未结 3 1499
太阳男子
太阳男子 2020-12-02 13:43

I have a WCF HTTP REST Service and I tie into it with an HTTP client in a different programming language who writes its own custom HTTP. I would like to add WWW-Authenticate

3条回答
  •  孤街浪徒
    2020-12-02 14:30

    I've had similar problems and found a lot of different approaches, especially the cross domain calls, together with basic authentication seems to be a bit of a challenge. Jquery for example first issues an OPTIONS call to verify it the POST is allowed. Wcf normally declines this request and you get a strange error.

    I've finally got it working and you can download sample code from my blog: http://sameproblemmorecode.blogspot.com/2011/10/creating-secure-restfull-wcf-service.html

提交回复
热议问题