我创建使用Visual Web Developer速成2010年。我想尝试各种绑定教育目的WCF服务设置为basicHttpBinding的WCF服务。在Visual Web快讯2010年
从2008年我的记忆是,在web.config自动包含在<services>
一节,然后我可以编辑修改端点绑定,例如basicHttpBinding的
但是我的自动生成的2010服务不包括<services>
以及<system.serviceModel>
下的任何子端点或绑定详细信息(请参阅下面的web.config)。我是否需要手动将此元素添加到Web.config中,或者是否有其他方法可以配置?或者这是Express版的限制吗?
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false
and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
更新1 - 我发现下面的链接,这似乎说明了同样的行为 - 现在调查:http://forums.silverlight.net/t/166429.aspx/1
所以大概我需要继续,并添加绑定到webconfig,以启用不同的配置,例如 <结合messageEncoding = “MTOM”/><! - 通知没有name属性 - > basicHttpBinding的> –
Durathor
是 - 如果你想改变一个绑定无需配置的服务,您需要添加一个'binding'标签,并且还需要一个'service'标签,将该绑定链接到您的服务。 –