开发者

How to rewrite a form action on the "Help Page" of an ASP.NET web service

For normal .aspx pages I can just put a F开发者_如何学JAVAorm.browser file into the App_Browsers directory like the following.

<browsers>
    <browser refID="Default">
        <controlAdapters>
              <adapter controlType="System.Web.UI.HtmlControls.HtmlForm"
                       adapterType="MyProject.FormRewriterControlAdapter" />
        </controlAdapters>
    </browser>
</browsers>

And in that class I can rewrite the action attribute of the form. However in the case of web service help pages, this file is not considered and the form is written with the default action (using an absolute URL).

This doesn't let me use a reverse proxy (Ionic's ISAPI Rewrite Filter - IIRF) to access my web service.

How can I accomplish this and rewrite the form action on the help page correctly?


If you need to change the help page, use the <wsdlHelpGenerator> element in the web.config.

You can find the default help page at C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\DefaultWsdlHelpGenerator.as‌​px.

Note that this will only help you when testing the service through the help page. It has nothing to do with how clients will access the service.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜