English 中文(简体)
WCF 未能找到的
原标题:WCF Default Endpoint not found

我正在设立一个世界合作框架处。 这是我的第一个。 我收到错误:

Could not find default endpoint element that references contract WCFClient.IWCFClient in the ServiceModel client configuration section.

我试图围绕最终点名进行转换,并删除/更新服务参考。 我看不出问题是什么。

申请表

<bindings>
    <basicHttpBinding>
         <binding name="BasicHttpBinding_IWCFClient" closeTimeout="00:01:00"
                openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                useDefaultWebProxy="true">
                <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                    maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                <security mode="None">
                    <transport clientCredentialType="None" proxyCredentialType="None"
                        realm="" />
                    <message clientCredentialType="UserName" algorithmSuite="Default" />
                </security>
            </binding>
    </basicHttpBinding>
    </bindings>
    <client>
        <endpoint address="http://localhost:4295/Services/WCFClient.svc"
            binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IWCFClient"
            contract="WCFClient.IWCFClient" name="BasicHttpBinding_IWCFClient" />
    </client>

Service Config:

 <services>
  <service behaviorConfiguration="WCFGraphicManagementTool.Services.WCFClientBehavior"
    name="WCFGraphicManagementTool.Services.WCFClient">
      <endpoint address="" name="BasicHttpBinding_IWCFClient" binding="basicHttpBinding" contract="WCFGraphicManagementTool.Contracts.IWCFClient">
    </endpoint>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="WCFGraphicManagementTool.Services.WCFClientBehavior">
        <dataContractSerializer maxItemsInObjectGraph="2147483647" />
        <serviceThrottling maxConcurrentCalls="120" maxConcurrentSessions="120" maxConcurrentInstances="120" />
        <serviceMetadata httpGetEnabled="True" />
        <serviceDebug includeExceptionDetailInFaults="True" />
    </behavior>
  </serviceBehaviors>
</behaviors>    
最佳回答

我只是说了。 我需要在项目网页上添加这一内容。 它正在运行,但不是项目。

问题回答

这通常是因为配置名称/名称空间与来源代码的合同名称或服务档案标记之间不匹配。 通常在通过视频演播室创建新服务之后,再改名为服务/名称空间。

解决办法探索者和选择观点

如果服务处的属性价值正确,则进行检查。 如果名称和名称都与你所分配的名称相符,则进行检查。

我们应当这样做:

<%@ ServiceHost Language="C#" Debug="true" Service="WCFGraphicManagementTool.Services.WCFClient" CodeBehind="WCFClient.svc.cs" %>




相关问题
Flex External Configuration File

My problem: I have a program in Flex3 that accesses a server. The program itself is on a server and accessed through a web browser. The point is that I don t want to hardcode in the swf file the IP of ...

Add an XML schema to Visual Studio

I want Intellisense support when writing App.config sections or XML configuration files for components like NHibernate, log4net, or Unity. What options do I have to get Visual Studio to find these ...

String format for Castle DictionaryAdapter

I m using Castle DictionaryAdapter in order to get the application settings from the app.config as an interface ( based on Getting rid of strings (3): take your app settings to the next level ): ...

AppSettings on a different .config file not being updated

I am trying to do the exact same thing mentioned on this recent previous question. In essence, here s the case (which is exactly my same situation): My plan is to have these (appSettings) in ...

How do you put HTML or XML into a YAML?

I would like to store HTML snippets inside a YAML file. What is the best way to do that? Something like: myhtml: | <div> <a href="#">whatever</a> </div>

AppConfig in a VS 2008 test project?

I ve just added my first test project to a VS 2008 solution. I have a component I d like to use in a unit test; the component calls System.Configuration.ConfigurationSettings.GetConfig() to get a ...

Why is a published website referencing my machine?

I have a website that I publish in Visual Studio 2008 and then send off to other people. One of the pages needs to alter a few configuration files, so an action is executed using ...

Updating AppSettings via ASP.NET MVC Controller

I m writing a basic little forums web app (for fun and to sharpen the ole saw), and I m having a bit of trouble with AppSettings. My plan is to have these settings in their own file (Settings.config)...

热门标签