Спросите об услуге WCF - PullRequest
0 голосов
/ 17 мая 2018

Я изменил имя пространства имен в интерфейсе и класс сервиса 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>

my 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>

ServiceReferences.ClientConfig расшарен.пожалуйста, помогите мне об этом.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...