如何在web.config中为Web服务指定扩展

在XML Web Service的开发实践中,经常会用到服务扩展,(SOAPExtensions),关于这一点,如果你不甚清楚,可以参考下面的链接

http://msdn.microsoft.com/zh-cn/library/esw638yk.aspx

 

这里特别整理一下的是,如何在Web.config中,为所有的服务指定统一的服务扩展。通常的配置如下

 

<?xml version="1.0"?>

<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->

<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
    <webServices>
      <soapExtensionTypes>
        <add type="WebApplication1.AuthExtensions,WebApplication1" priority="0"/>
      </soapExtensionTypes>
    </webServices>
  </system.web>
</configuration>
posted @ 2010-07-31 21:52  陈希章  阅读(960)  评论(0编辑  收藏  举报