Windows AppFabric 自动启动未启动 WCF 服务
我整晚都在为此奋斗,所以这里是:
我有一个 Azure 服务总线 WCF 服务,称为 Send。我想使用 Windows 2008 R2(标准)服务器通过 Windows Server AppFabric 的自动启动功能在 IIS 中托管它。
我已经安装了Windows Server AppFabric,看起来很顺利。但是,我在 UI 中缺少“自动启动”选项,您通常可以通过右键单击 IIS 中的“网站”节点来获得该选项,它应该如下所示:
但是,我改用了 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:
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会回答我自己的问题,因为我终于弄清楚了。我试图在根网站中自动启动服务。事实证明,它需要是一个从现有网站添加的应用程序。如果他们在某个地方这么说就好了。我的所有选项都出现了,并且该服务实际上自动启动了。
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.