我在界面和wcf服务类中更改了命名空间的名称,现在当我将此服务添加到我的项目时,我遇到了这个错误:
There was an error downloading
'http://localhost:23724/DataAccess/Customer.svc/$metadata'.
The request failed with the error message:
--
<!DOCTYPE html>
<html>
<head>
<title>The type 'CoffeShop.Web.Business.Customer', provided as the
Service attribute value in the ServiceHost directive, or provided in the
configuration element
system.serviceModel/serviceHostingEnvironment/serviceActivations could not be
found.</title>
<?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.5.2" />
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="false"
multipleSiteBindingsEnabled="true"/>
</system.serviceModel>
<connectionStrings>
<add name="myDB" connectionString="Data Source=HAJI\HAJISQL;Initial Catalog=CoffeShop;Integrated Security=True"/>
</connectionStrings>
</configuration>
&#13;
我的webconfig。 请帮忙。
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IProduct" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="../DataAccess/Product.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IProduct" contract="ProductService.IProduct"
name="BasicHttpBinding_IProduct" />
</client>
</system.serviceModel>
</configuration>
&#13;
ServiceReferences.ClientConfig已共享。 请帮帮我。