Implementing Policy Injection Application Block & Unity Container in a Service Created with the REST Starter Kit

Last post 06-24-2009 8:11 PM by randallt. 3 replies.

Sort Posts:

  • Implementing Policy Injection Application Block & Unity Container in a Service Created with the REST Starter Kit

    06-23-2009, 2:55 AM
    • Member
      point Member
    • NeXeS
    • Member since 06-23-2009, 6:43 AM
    • Posts 2

    I started by following the example for EntLib 3.x here  http://msdn.microsoft.com/en-us/magazine/cc136759.aspx.

    Then followed the instruction on this link to get it to work with EntLib 4.1 http://entlib.codeplex.com/Thread/View.aspx?ThreadId=38767.

     Now I can't figure out how to get it to work with a service that was built using the REST Starter Kit.  Most of the the configuration needed for a WCF service is not there when the REST Starter Kit is used (example. endpointbehaviors).

     Any help would be greatly appreciated.

    Thanks in advance.

  • Re: Implementing Policy Injection Application Block & Unity Container in a Service Created with the REST Starter Kit

    06-23-2009, 9:21 AM
    • Member
      576 point Member
    • Near
    • Member since 11-11-2006, 8:26 AM
    • Posts 170

     Hi,

    Would you mind to share what are you trying to achieve with this way of doing?

    BR,
    Near

  • Re: Implementing Policy Injection Application Block & Unity Container in a Service Created with the REST Starter Kit

    06-23-2009, 3:40 PM
    • Member
      point Member
    • NeXeS
    • Member since 06-23-2009, 6:43 AM
    • Posts 2

    Sure,

    I am trying to better manage crosscutting concerns (ex. logging, peroformance monitoring, etc.), by separating and encapsulating the behavior of the crosscutting concerns away from the core logic of the RESTful service, to improve the managablity and maitainablity.

  • Re: Implementing Policy Injection Application Block & Unity Container in a Service Created with the REST Starter Kit

    06-24-2009, 8:11 PM
    • Member
      90 point Member
    • randallt
    • Member since 02-11-2009, 11:53 AM
    • Posts 30

    Hi Nexes,

    You can still use configuration with WCF REST services.  WCF REST just uses common default values if you don't provide any configuration.

    Feel free to create a web.config file, add the system.serviceModel tag and a services tag with endpoints.  When configuring the binding use a webHttpBinding.  Also, you'll need to add a webHttp endpoint behavior.  In fact, WCF REST is simply WCF with a webHttpBinding and the webHttpBehavior.  You can then add any other behaviors that you need to at the service level or endpoint level.

    Hope that helps.  If you have more detailed quetions about how to configure a particular thing, just reply back.

    Thanks,

      ~Randall

Page 1 of 1 (4 items)