user1844634 February 2016

Does IHttpModule module work with WCF service,

I have WCF service. i want each and request to WCF operation be scanned throughthe IHttpModule module. But it not hitting the IHttpModule.

Any help is highly appreciated.

Answers


Pankaj Kapare February 2016

HttpModules work with WCF only if you run WCF service in ASP.NET compatibility mode. You can enable ASP.NET compatibility mode either of following way.

  1. Using web.config

    < system.serviceModel> < serviceHostingEnvironment aspNetCompatibilityEnabled="true"/> < /system.serviceModel>

  1. Using attribute

    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class Service : IService { // ... }

Post Status

Asked in February 2016
Viewed 3,765 times
Voted 5
Answered 1 times

Search




Leave an answer