I'm trying to create a custom ASP.NET HttpHandler to work with any requests to a WCF web services (*.svc) to return a simple predefined SOAP message.
However, after added the HttpHandler to the web.config as shown below. It seems that IIS doesn't pick up the handler to execute. But, the same handler seems to be working fine with *.aspx
<remove verb="*" path="*.svc"/>
<add verb="*" path="*.svc" type="… " />
Does anyone know how to make the HttpHandler to work with the svc extension? or
Are there any other techniques to achieve the same goal?
Thank you everyone for your responses. I got my custom HttpHandler working now after adding the following config into the web.config file.
<compilation>
<buildProviders>
<remove extension=".svc" />
</buildProviders>
</compilation>
In your web.config you need to add the following so that IIS will forward the response through to your handler:
<compilation>
<buildProviders>
<remove extension=".svc" />
</buildProviders>
</compilation>
More information on MSDN.
Adding this as a proper answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With