我整晚都在和这个作斗争,所以这里是:
我有一个名为 Send 的 Azure 服务总线 WCF 服务。我想使用 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);
}
我还按照此处http://msdn.microsoft.com/en-us/gg282466的说明将 ServiceBus_schema.xml 添加到 Inetserv 下的正确文件夹中
如果我真的在浏览器中访问该服务,它会正常加载,并且我看到服务总线注册了端点。但是,它应该在我此时不做任何事情的情况下这样做。
有人有想法么?