< serviceHostingEnvironment multipleSiteBindingsEnabled ="true"/>上的错误在IIS上发布时 [英] Error on <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/> while publish on IIS
问题描述
我有一个使用默认方法的测试wcf服务,Web配置为:
I have one test wcf service with default methods and web config is :
<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>
在本地IIS上发布时工作正常.但是,当我尝试在远程IIS上发布时,出现此错误:
on local IIS it works fine when i publish it.But when i try to publish on remote IIS i am getting this error :
说明:在处理 服务此请求所需的配置文件.请查看 下面的特定错误详细信息并修改您的配置文件 适当地.
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
解析器错误消息:使用注册为 allowDefinition ='MachineToApplication'超出应用程序级别.这 错误可能是由于虚拟目录未配置为 IIS中的应用程序.
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Line 23: </service>
Line 24: </services>
**Line 25: <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>**
Line 26: </system.serviceModel>
Line 27: <system.webServer>
提前谢谢.
推荐答案
我得到了解决方案:
在IIS中,如果应用程序确实是应用程序,而不是虚拟目录?该图标应该看起来像地球,而不是文件夹的图标.如果不是,请将其转换为应用程序,右键单击文件夹,选择deploy,然后使用
In IIS if the application is indeed an application, not a virtual directory? The icon should be something looks like the earth, not a folder's icon. If not, please convert it to an application right click on the folder select deploy and then Application.Service running with
这篇关于< serviceHostingEnvironment multipleSiteBindingsEnabled ="true"/>上的错误在IIS上发布时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!