简体   繁体   English

WCF找不到与绑定MetadataExchangeHttpBinding的端点的方案http匹配的基地址

[英]WCF Could not find a base address that matches scheme http for the endpoint with binding MetadataExchangeHttpBinding

I'm trying to get a wcf service working in a windows service host. 我正在尝试让wcf服务在Windows服务主机中工作。 I am currently receiving the error "Could not find a base address that matches scheme http for the endpoint with binding MetadataExchangeHttpBinding. Registered base address schemes are [net.tcp]." 我当前收到错误消息“找不到与绑定MetadataExchangeHttpBinding的端点的方案http匹配的基地址。注册的基地址方案为[net.tcp]。”

I am using .Net Framework 4.5 我正在使用.Net Framework 4.5

I am trying to get a tcp.net binary service. 我正在尝试获取tcp.net二进制服务。 Any help appreciated. 任何帮助表示赞赏。 The trace file that I have created isn't being helpful. 我创建的跟踪文件没有帮助。 Here's my [REVISED] app.config: 这是我的[已修订] app.config:

 <?xml version="1.0" encoding="utf-8" ?> <!-- IMPORTANT! To run this on your local machine, first follow instructions in http://support2.microsoft.com/kb/2785590 --> <!-- You will run into tcp listen errors otherwise --> <configuration> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> </startup> <system.serviceModel> <services> <service name="SettingsDB.Configuration" behaviorConfiguration="DefaultBehavior"> <endpoint binding="netTcpBinding" bindingConfiguration="max" contract="SettingsDB.IConfiguration" address="Settings" /> <host> <baseAddresses> <add baseAddress="net.tcp://localhost:9000/SettingsService" /> </baseAddresses> </host> </service> </services> <bindings> <netTcpBinding> <binding name="max" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxConnections="2147483647" maxReceivedMessageSize="2147483647" listenBacklog="2147483647" transactionFlow="false" portSharingEnabled="true"> <readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxNameTableCharCount="2147483647" maxStringContentLength="2147483647" /> <reliableSession enabled="false" /> <security mode="None" /> </binding> </netTcpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="DefaultBehavior"> <serviceMetadata httpGetEnabled="false" httpGetUrl="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> <system.diagnostics> <sources> <source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true"> <listeners> <add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData="c:\\Traces.svclog" /> </listeners> </source> </sources> </system.diagnostics> <system.web> <compilation debug="true" /> </system.web> <runtime> <gcServer enabled="true" /> </runtime> </configuration> 

can you try: 你能试一下吗:

<service name="SettingsDB.Settings">

add name to the behavior and change the httpGetUrl to simply true 为行为添加名称,并将httpGetUrl更改为true

<behavior>
  <serviceMetadata httpGetEnabled="true" 
                   httpGetUrl="true"     />
  <serviceDebug includeExceptionDetailInFaults="true" />
</behavior>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WCF 异常:找不到与端点的方案 http 匹配的基地址 - WCF Exception: Could not find a base address that matches scheme http for the endpoint 找不到与绑定WSHttpBinding的端点的scheme http匹配的基址 - Could not find a base address that matches scheme http for the endpoint with binding WSHttpBinding 找不到与绑定BasicHttpBinding的端点匹配方案http的基地址 - Could not find a base address that matches scheme http for the endpoint with binding BasicHttpBinding WCF错误。 找不到与绑定WSHttpBinding的端点的方案http匹配的基地址 - Error with WCF. Could not find a base address that matches scheme http for the endpoint with binding WSHttpBinding 找不到与绑定WSHttpBinding的端点匹配方案http的基地址。 注册的基址方案为[https] - Could not find a base address that matches scheme http for the endpoint with binding WSHttpBinding. Registered base address schemes are [https] 找不到与绑定BasicHttpBinding的端点匹配方案https的基地址。 注册的基址方案是http - Could not find a base address that matches scheme https for the endpoint with binding BasicHttpBinding. Registered base address schemes are http 找不到与具有绑定 WebHttpBinding 的端点的方案 https 匹配的基址。 注册的基址方案是 [http] - Could not find a base address that matches scheme https for the endpoint with binding WebHttpBinding. Registered base address schemes are [http] wcf找不到与绑定BasicHttpsBinding的端点的方案https匹配的基地址。 - wcf Could not find a base address that matches scheme https for the endpoint with binding BasicHttpsBinding. 找不到与绑定BasicHttpBinding的端点的方案https匹配的基址 - Could not find a base address that matches scheme https for the endpoint with binding BasicHttpBinding 找不到与绑定 NetTcpBinding 的端点的方案 net.tcp 匹配的基地址。 基地址方案是 [http] - Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Base address schemes are [http]
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM