none
How to use HttpConfiguration in Restful WCF RRS feed

  • Question

  • Hi,

    Currently I am using restful wcf service and I want to implement json web token based(JWT) authentication using HttpConfiguration class, but this dll comes under Asp.net web api so how can I achieve this ?

    How can I use MapHttpRoute in wcf restful ?

    Tuesday, March 22, 2016 10:42 AM

Answers

  • Hi dipika,

    >> Currently I am using restful wcf service and I want to implement json web token based(JWT) authentication using HttpConfiguration class

    As far as I known, currently it seems that WCF can’t deal with JWTs directly by using HttpConfiguration. The following may provide a workaround for you, please try to check it:

    http://leastprivilege.com/2015/07/02/give-your-wcf-security-architecture-a-makeover-with-identityserver3/

    >>How can I use MapHttpRoute in wcf restful?

    As @ujmokm said, we could not use MapHttpRoute in WCF rest service, but we could use UriTemplate in WCF rest service. For more information about UriTemplate, please refer to:

    https://msdn.microsoft.com/en-us/library/bb675245(v=vs.110).aspx .

    Best Regards,
    Amy Peng

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, March 30, 2016 1:30 AM
    Moderator

All replies

  • Hello,

    We can not use the MapHttpRoute in the WCF Restful service. Why not just using the WebAPI? The WebAPI can implement the function as same as the Rest Service.

    Wednesday, March 23, 2016 2:17 PM
  • Hi dipika,

    >> Currently I am using restful wcf service and I want to implement json web token based(JWT) authentication using HttpConfiguration class

    As far as I known, currently it seems that WCF can’t deal with JWTs directly by using HttpConfiguration. The following may provide a workaround for you, please try to check it:

    http://leastprivilege.com/2015/07/02/give-your-wcf-security-architecture-a-makeover-with-identityserver3/

    >>How can I use MapHttpRoute in wcf restful?

    As @ujmokm said, we could not use MapHttpRoute in WCF rest service, but we could use UriTemplate in WCF rest service. For more information about UriTemplate, please refer to:

    https://msdn.microsoft.com/en-us/library/bb675245(v=vs.110).aspx .

    Best Regards,
    Amy Peng

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, March 30, 2016 1:30 AM
    Moderator