HttpHandler to hook the *.svc requests

前端 未结 2 792
情歌与酒
情歌与酒 2021-01-17 23:59

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

相关标签:
2条回答
  • 2021-01-18 00:16

    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.

    0 讨论(0)
  • 2021-01-18 00:16

    You could simply not use the .svc extension... just use anything else that works, and tell the client the address. There may be additional goo associated with that particular exntension (dynamic compilation, etc).

    0 讨论(0)
提交回复
热议问题