2011-05-01 105 views
1

我一直在爲這一整晚而戰,所以這裏有:Windows AppFabric自動啓動不啓動WCF服務

我有一個名爲Send的Azure服務總線WCF服務。我想使用Windows Server 2008 R2(標準)服務器在IIS中使用Windows Server AppFabric的自動啓動功能來承載此服務器。

我已經安裝了Windows Server AppFabric,它看起來很順利。不過,我很想念在UI自動啓動選項,您通常會通過右鍵單擊IIS中的網站節點得到的,它應該是這樣的:

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

但是,我用PowerShell命令代替,他們似乎工作。有選擇地自動啓動服務的選項已啓用。所以,我覺得它應該工作。但是,它不會自動啓動,我也不會在事件日誌中發現任何錯誤。下面是我的web配置:

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

如果我真的去到瀏覽器的服務中的說明,它精緻加載了,我看到了服務總線註冊端點。但是,在這一點上,沒有我做任何事情,它應該是這樣做的。

任何人有任何想法?

回答

4

我會回答我自己的問題,因爲我終於明白了。我試圖在根網站上自動啓動服務。事實證明,它需要是一個現有網站添加的應用程序。如果他們在某個地方說過,那會很好。我的所有選項都顯示出來,並且服務確實有效地自動啓動。

+0

重新修復舊線程 - 您可以詳細介紹一下您在IIS中設置的層次結構嗎? – ozz 2012-01-24 14:25:05