问题描述
我一直在使用Windows Azure SDK,特别是包含许多实验的Azure Services Kit.我遇到了WCF问题.我收到错误: System.ServiceModel.ServiceHostingEnvironment + HostingManager/36963566 I have been working with the Windows Azure SDK, specifically the Azure Services Kit which contains many labs. I am running into an issue with WCF. I am receiving the error: System.ServiceModel.ServiceHostingEnvironment+HostingManager/36963566 < system.serviceModel> <system.serviceModel> 这篇关于找不到与绑定BasicHttpBinding的端点匹配方案http的基地址.注册的基址方案为[].的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
"所请求的服务 无法被激活. "
MessengerService是一个WCF日志记录服务,运行在Developer Fabric的端口81上,我创建了一个控制台应用程序进行测试;从控制台应用程序向服务发送消息会在系统事件日志中显示以下错误消息.
例外:系统.ServiceModel.ServiceActivationException:由于编译期间发生异常,因此无法激活服务"/MessageLogger.svc".异常消息是:找不到与绑定BasicHttpBinding的端点的方案http匹配的基地址.注册的基址方案是[]. System.InvalidOperationException:找不到与绑定BasicHttpBinding的端点匹配方案http的基地址.注册的基址方案为[].
我的 App.config 是:
"The requested service http://localhost:81/MessageLogger.svc/ could not be activated. "
MessengerService is a WCF logging service running in the Developer Fabric on port 81, I created a console application to test with; sending messages from the console application to the service results in the error message below in the system event log.
Exception: System.ServiceModel.ServiceActivationException: The service '/MessageLogger.svc' cannot be activated due to an exception during compilation. The exception message is: Could not find a base address that matches scheme http for the endpoint with binding BasicHttpBinding. Registered base address schemes are [].. ---> System.InvalidOperationException: Could not find a base address that matches scheme http for the endpoint with binding BasicHttpBinding. Registered base address schemes are [].
My App.config is:
<绑定>
< basicHttpBinding>
closeTimeout ="00:01:00"
; openTimeout ="00:01:00"; receiveTimeout ="00:10:00" sendTimeout ="00:01:00"
. BypassProxyOnLocal ="false"; hostNameComparisonMode ="StrongWildcard"
; maxBufferSize ="65536"; maxBufferPoolSize ="524288" maxReceivedMessageSize ="65536"
textEncoding ="utf-8"; transferMode =缓冲的" useDefaultWebProxy ="true"..maxBytesPerRead ="4096". maxNameTableCharCount ="16384"; /<
<安全模式=无"<
< transport clientCredentialType ="None"<< transport clientCredentialType =" None" proxyCredentialType =无"
领域="realm =" />
消息< message clientCredentialType =" UserName" ;; algorithmSuite =默认" />
</security<
" http://localhost:81/MessageLogger.svc "
bindingConfiguration ="BasicHttpBinding_IMessageLogger"
contract ="RDService.IMessageLogger"; name ="BasicHttpBinding_IMessageLogger" />
</client>
</system.serviceModel>
----------------------------------------- -------------------------------------------------- ----------------------------------------
我的 WebConfig 是:
< system.serviceModel>
<行为>
< serviceBehaviors< service>< Message< Behavior<< Web®< Behavior<< Web®> Loghavior< Web"行为名称br>.< serviceMetadata httpGetEnabled ="true"; />
.< serviceDebug includeExceptionDetailInFaults ="false"; </&behaviour></&behavior></&behavior”</behavior></&behavior”</behavior></&behavior” >名称="RDCompute_WebRole.MessageLogger"<>< endpoint address =" binding ="basicHttpBinding"合同="RDCompute_WebRole.IMessageLogger"<身份<身份<身份< dns值=本地主机" /</
</identity>
</endpoint>
binding ="mexHttpBinding" contract ="IMetadataExchange" />
</service<</services</services</</services>
< serviceHostingEnvironment>
< baseAddressPrefixFilters" </localhost:5100/> http://localhost:5100/>
p>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IMessageLogger" 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:81/MessageLogger.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IMessageLogger"
contract="RDService.IMessageLogger" name="BasicHttpBinding_IMessageLogger" />
</client>
</system.serviceModel>
-----------------------------------------------------------------------------------------------------------------------------------
My WebConfig is:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="RDCompute_WebRole.MessageLoggerBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="RDCompute_WebRole.MessageLoggerBehavior"
name="RDCompute_WebRole.MessageLogger">
<endpoint address="" binding="basicHttpBinding" contract="RDCompute_WebRole.IMessageLogger">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<serviceHostingEnvironment>
<baseAddressPrefixFilters>
<add prefix="http://localhost:5100/>
</baseAddressPrefixFilters>
</serviceHostingEnvironment>
</system.serviceModel>推荐答案