Windows AppFabric 自动启动未启动 WCF 服务

发布于 2024-11-04 08:01:32 字数 2190 浏览 0 评论 0原文

我整晚都在为此奋斗,所以这里是:

我有一个 Azure 服务总线 WCF 服务,称为 Send。我想使用 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);
}

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

如果我实际上在浏览器中访问该服务,它会正常加载,并且我会看到服务总线注册端点。但是,此时我无需做任何事情,它就应该这样做。

有人有什么想法吗?

I have been fighting with this all night, so here goes:

I have a Azure Service Bus WCF service, called Send. I want to use Windows 2008 R2 (standard) server to host this in IIS using Windows Server AppFabric's Auto-Start Feature.

I have installed Windows Server AppFabric, it seemed to go smoothly. However, I am missing the Auto-Start option in the UI you would normally get by right clicking the Website node in IIS, it should look like this:

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

However, I used the powershell commands instead, and they seemed to work. The option to selectively auto-start a service did enable. So, I figured it should be working. But, it does not auto start, I also do not get any errors in the eventlogs. Below is my web config:

  <!-- 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>

My service contract is pretty basic:

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

I also added the ServiceBus_schema.xml into the correct folder under Inetserv following the directions from here http://msdn.microsoft.com/en-us/gg282466

If I actually go to the service in a browser, it loads up fine, and I see the Service Bus register the endpoint. But, it should be doing that without me doing anything at this point.

Anyone have any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

沐歌 2024-11-11 08:01:32

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

I will answer my own question because I finally figured it out. I was trying to auto start a service in a root website. It turns out it needs to be an application added off an existing web site. It would be nice if they said that somewhere. All of my options showed up and the service did actaully auto start.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文