【问题标题】:Windows AppFabric Auto-Start not starting WCF serviceWindows AppFabric 自动启动未启动 WCF 服务
【发布时间】:2011-05-01 05:10:44
【问题描述】:

我整晚都在和这个作斗争,所以这里是:

我有一个名为 Send 的 Azure 服务总线 WCF 服务。我想使用 Windows 2008 R2(标准)服务器使用 Windows Server AppFabric 的自动启动功能在 IIS 中托管它。

我已经安装了 Windows Server AppFabric,看起来很顺利。但是,我缺少 UI 中的自动启动选项,您通常可以通过右键单击 IIS 中的网站节点获得,它应该如下所示:

http://developers.de/cfs-filesystemfile.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_40F1B83A.png

但是,我改用了 powershell 命令,它们似乎可以工作。有选择地自动启动服务的选项确实启用了。所以,我认为它应该工作。但是,它不会自动启动,我也没有在事件日志中收到任何错误。以下是我的网络配置:

  <!-- Service Bus Service -->
  <service name="TestWeb.Send" behaviorConfiguration="serviceBusBehavior">
    <endpoint address="sb://mynamespace.servicebus.windows.net/Send/" contract="TestWeb.ISend" binding="netTcpRelayBinding" behaviorConfiguration="SharedSecretCredentials" />
  </service>

</services>

<behaviors>
  <serviceBehaviors>
    <behavior name="serviceBusBehavior">
      <serviceMetadata />
    </behavior>       
  </serviceBehaviors>

  <endpointBehaviors>
    <behavior name="SharedSecretCredentials">
      <transportClientEndpointBehavior credentialType="SharedSecret">
        <clientCredentials>
          <sharedSecret issuerName="owner" issuerSecret="xxxxxxxxxxxxxxxxxxxxxx=" />
        </clientCredentials>
      </transportClientEndpointBehavior>
    </behavior>
  </endpointBehaviors>

</behaviors>

我的服务合同非常基本:

[ServiceContract]
public interface ISend
{
    [OperationContract]
    void SendMail(String Subject, String To, String Text, String HTML);
}

我还按照此处 http://msdn.microsoft.com/en-us/gg282466 的指示将 ServiceBus_schema.xml 添加到 Inetserv 下的正确文件夹中

如果我真的在浏览器中访问该服务,它会正常加载,并且我看到服务总线注册了端点。但是,在这一点上,它应该在我不做任何事情的情况下这样做。

有人有什么想法吗?

【问题讨论】:

    标签: .net wcf azure servicebus


    【解决方案1】:

    我会回答我自己的问题,因为我终于弄明白了。我试图在根网站中自动启动服务。事实证明,它需要是从现有网站添加的应用程序。如果他们在某个地方这么说就好了。我的所有选项都出现了,服务确实自动启动了。

    【讨论】:

    • 恢复旧线程 - 您能否准确扩展您在 IIS 中设法开始工作的层次结构?
    猜你喜欢
    • 1970-01-01
    • 2013-06-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-01-16
    相关资源
    最近更新 更多