-1
我正在使用wcf服務向我的客戶提供一些數據來繪製圖表。我已經看到了一些東西並創建了服務但是當我運行它時顯示以下錯誤。如何結束它? The type 'WcfService2.Servi', provided as the Service attribute value in the
ServiceHost directive, or provided in the configuration element
system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found
。wcf服務中的錯誤
這是我的web.config文件
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<services>
<service name="WcfService2.Servi" behaviorConfiguration="WcfService1.Service1Behavior">
<!-- Service Endpoints -->
<endpoint address="" binding="webHttpBinding" contract="WcfService2.Servi" behaviorConfiguration="web" bindingConfiguration="crossDomain">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WcfService1.Service1Behavior">
<!-- 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>
<endpointBehaviors>
<behavior name="web">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<webHttpBinding>
<binding name="crossDomain" crossDomainScriptAccessEnabled="true" />
</webHttpBinding>
</bindings>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
http://meta.stackexchange.com/questions/10647/how-do-i-write-a-good-title –
有問題嗎? –
對不起史蒂夫在快我發佈了..你現在可以理解這個問題嗎? – aravind