我有一個使用netTcpBinding,transferMode =「Streamed」的WCF服務,並通過installutil通過Windows進程激活服務方法進行安裝。該服務的構建和安裝很好。我對包含文件夾訪問.exe文件的網絡服務擁有所有正確的權利。我的問題是我不斷收到錯誤:Streamed Service - netTCPBinding - 服務構建,安裝但不會啓動
「本地計算機上的服務[服務名稱]已啓動,然後停止。如果某些服務沒有被其他服務或程序使用,則會自動停止。
奇怪的是主機安裝程序的代碼和緩衝服務是一樣的,運行得很好。在流媒體服務中,我會根據需要考慮傳遞流和消息。我被卡住了。我似乎無法找出爲什麼這項服務不能站起來。我檢查了端口,並且它們是開放的(沒有衝突)。有沒有人對'Streamed'netTcp服務沒有啓動建議?
下面是App.Config中的樣子:
<system.serviceModel>
<!--### Service Endpoints: ###-->
<!--Define Bindings-->
<bindings>
<netTcpBinding>
<binding name="netTcpStreamedBinding" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:20:00" sendTimeout="00:10:00"
transferMode="Streamed" maxBufferPoolSize="104857600"
maxReceivedMessageSize="1073741824" maxBufferSize="262144">
<!-- Commented below out to match service that worked to see if this was error - It is not the problem (still no start)
<security mode="Transport">
<transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
<message clientCredentialType="Windows" />
</security>-->
</binding>
</netTcpBinding>
</bindings>
<!--Streamer Service-->
<services>
<service name="MyServiceLib.FileStreamer">
<endpoint address="" binding="netTcpBinding" bindingConfiguration="netTcpStreamedBinding" contract="MyServiceLib.IFileStreamer">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:.../MyStreamerService"/>
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information,
set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="False" httpsGetEnabled="False"/>
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
需要考慮的一點是我在使用DirectorySecurity創建Put/Upload操作中的目錄。然而,類似的「緩衝」服務也是如此,並且開始就好。 –