Clean config after porting asmx to WCF?

I have recently changed an old asmx web service into a WCF web service by adding a .svc using VS 2010, which added the necessary WCF stuff to the web.config. The asmx file has been removed and the service class rewritten.
Now I want to cleanse my config from asmx stuff, but I can't figure out which sections in the web.config that I can remove now.
Is there a list of sections that are asmx-only somewhere?
Or is there a list of sections that are the only things WCF needs?


Yes, there's a list of the configuration sections that WCF uses, just about everything for your services and clients is located in the ServiceModel section. Refer to the system.serviceModel MSDN article for a complete overview. Here's a list of the first level of sub-elements allowed in that section:

<behaviors>
<bindings>
<client>
<comContracts>
<commonBehaviors>
<diagnostics>
<extensions>
<protocolMapping>
<routing>
<serviceHostingEnvironment>
<services> 
<standardEndpoints>

Of course there may be a few other web/app config sections on which WCF relies, for example if you have TraceListeners defined, etc.

链接地址: http://www.djcxy.com/p/71296.html

上一篇: 在WCF服务中使用ASMX Web服务实体

下一篇: 将asmx移植到WCF后清理配置?