通过Azure Appfabric中继服务公开本地WCF服务

时间:2012-01-17 15:13:33

标签: azure appfabric azure-appfabric

我一直在this new course,在“演示:配置现有服务以使用中继服务”部分中关注Pluralsight演示。

一切顺利,直到我希望在https://MyURL.servicebus.windows.net/

上看到appfabric中列出的服务

什么都没有出现。

我经历了很多次,检查并重新检查我的设置。

我的服务托管在IIS中,它正在运行,web.config将其设置为侦听上述URL,我已配置自动启动,并在我更改设置时刷新,因此应该正在倾听,但尚未显示任何服务。

我有this net.pipe error,我已按照此修复程序进行操作,以便事件日志中不会显示任何错误。

我可能遗失的任何其他东西或我可以检查的东西?

我的托管服务如何“监听”以及如何将其服务数据“发布”到服务总线上?有什么东西我可以嗅到它是如何/为什么失败的?

我知道网络设置很重要,我需要特定的端口需要打开等等。我们的IT人员向我保证正确的端口是打开的,机器应该能够通过它们。

我还在网站和服务上启用了自动启动功能。

更新 我已经设法以编程方式自行托管服务,该服务将服务发布到Azure服务总线源中,并可以使用网络上的服务总线端点调用服务 - 这证明网络端口全部打开,但我仍然希望它托管在IIS。

这是我的web.config删除了安全的个人详细信息(道歉,这是一个大问题!)

    <?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>
    <bindings>
      <webHttpRelayBinding>
        <binding name="anonymous">
          <security relayClientAuthenticationType="None" />
        </binding>
      </webHttpRelayBinding>
      <netTcpRelayBinding>
        <binding name="Hybrid">
          <security relayClientAuthenticationType="None" />
        </binding>
      </netTcpRelayBinding>
    </bindings>
    <behaviors>
      <endpointBehaviors>
        <behavior name="MyBehaviour">
          <serviceRegistrySettings discoveryMode="Public" displayName="My Service" />
          <transportClientEndpointBehavior credentialType="SharedSecret">
            <clientCredentials>
              <sharedSecret issuerName="Listener" issuerSecret="MYSECRET"></sharedSecret>
            </clientCredentials>
          </transportClientEndpointBehavior>
        </behavior>
        <behavior name="MyBehaviourRest">
          <serviceRegistrySettings discoveryMode="Public" displayName="My Rest Service" />
          <transportClientEndpointBehavior credentialType="SharedSecret">
            <clientCredentials>
              <sharedSecret issuerName="Listener" issuerSecret="MYSECRET"></sharedSecret>
            </clientCredentials>
          </transportClientEndpointBehavior>
          <webHttp />
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true" />
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <services>
      <service name="MyService">
        <endpoint address="" binding="basicHttpBinding" contract="My.NameSpace.IContract"></endpoint>
        <endpoint address="Rest" binding="webHttpBinding" contract="My.NameSpace.IContract"></endpoint>
        <endpoint address="https://MYURL.servicebus.windows.net/MyService" behaviorConfiguration="MyBehaviour" binding="basicHttpBinding" contract="My.NameSpace.IContract"></endpoint>
        <endpoint address="sb://MYURL.servicebus.windows.net/MyServiceNet" behaviorConfiguration="MyBehaviour" binding="netTcpRelayBinding" contract="My.NameSpace.IContract"></endpoint>
        <endpoint address="https://MYURL.servicebus.windows.net/MyServiceRest" behaviorConfiguration="MyBehaviourRest" binding="webHttpRelayBinding" bindingConfiguration="anonymous" contract="My.NameSpace.IContract"></endpoint>
      </service>
    </services>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    <extensions>
      <!-- In this extension section we are introducing all known service bus extensions. User can remove the ones they don't need. -->
      <behaviorExtensions>
        <add name="connectionStatusBehavior" type="Microsoft.ServiceBus.Configuration.ConnectionStatusElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="transportClientEndpointBehavior" type="Microsoft.ServiceBus.Configuration.TransportClientEndpointBehaviorElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="serviceRegistrySettings" type="Microsoft.ServiceBus.Configuration.ServiceRegistrySettingsElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </behaviorExtensions>
      <bindingElementExtensions>
        <add name="netMessagingTransport" type="Microsoft.ServiceBus.Messaging.Configuration.NetMessagingTransportExtensionElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="tcpRelayTransport" type="Microsoft.ServiceBus.Configuration.TcpRelayTransportElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="httpRelayTransport" type="Microsoft.ServiceBus.Configuration.HttpRelayTransportElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="httpsRelayTransport" type="Microsoft.ServiceBus.Configuration.HttpsRelayTransportElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="onewayRelayTransport" type="Microsoft.ServiceBus.Configuration.RelayedOnewayTransportElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </bindingElementExtensions>
      <bindingExtensions>
        <add name="basicHttpRelayBinding" type="Microsoft.ServiceBus.Configuration.BasicHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="webHttpRelayBinding" type="Microsoft.ServiceBus.Configuration.WebHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="ws2007HttpRelayBinding" type="Microsoft.ServiceBus.Configuration.WS2007HttpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="netTcpRelayBinding" type="Microsoft.ServiceBus.Configuration.NetTcpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="netOnewayRelayBinding" type="Microsoft.ServiceBus.Configuration.NetOnewayRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="netEventRelayBinding" type="Microsoft.ServiceBus.Configuration.NetEventRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="netMessagingBinding" type="Microsoft.ServiceBus.Messaging.Configuration.NetMessagingBindingCollectionElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </bindingExtensions>
    </extensions>
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
        <directoryBrowse enabled="true" />
  </system.webServer>
</configuration>

0 个答案:

没有答案