Get IHttpHandler in WCF service

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?QWxwaGFwYWdl?=

    Get IHttpHandler in WCF service

    Hello,

    I want to get the IHttpHandler from a svc service.
    With old asmx webservices, I get it using
    WebServiceHandl erFactory.GetHa ndler .

    How can I get IHttpHandler in WCF running in serviceHostingE nvironment :
    aspNetCompatibi lityEnabled="tr ue" ?

    Thanks in advance for your help.
  • Marc Gravell

    #2
    Re: Get IHttpHandler in WCF service

    OK; *why* do you want the handler? What do you want to do?

    Most things you can do by looking at the WCF pipeline ("inspectors ",
    etc). Yes, cmopatibility mode is an option, but I wouldn't use it
    unless I had to - WCF doesn't always run over http or via ASP.NET...

    Marc

    Comment

    • =?Utf-8?B?QWxwaGFwYWdl?=

      #3
      Re: Get IHttpHandler in WCF service

      Marc,

      I only want to get the Handler as I was doing in an old asmx webservice.

      Comment

      • Marc Gravell

        #4
        Re: Get IHttpHandler in WCF service

        I only want to get the Handler as I was doing in an old asmx webservice.

        Yes... but why; what do you want to do with the handler? The point is
        that there may be different (but more than adequate) ways of doing
        this with WCF. Quite simply, WCF isn't actually part of the ASP.NET
        pipeline, and handlers are an ASP.NET feature. If you happen to be
        running in ASP.NET, you *might* be able to get the handler (not sure)
        via compatibility mode, but I would still consider this a hacky
        solution, and it adds unnecessary overhead (the ASP.NET shims) to the
        WCF stack.

        So if you can tell me what you actually want to do, I might be able to
        suggest an appropriate WCF way to do this...

        Marc

        Comment

        Working...