簡體   English   中英

如何在Windows Vista上使用netNamedPipeBinding和WAS在Web應用程序中托管WCF服務

[英]How to host a WCF service in a web application with netNamedPipeBinding and WAS on Windows Vista

我試圖在Vista計算機上的Web應用程序中使用netNamedPipeBinding來托管WCF服務。

我啟用了非HTTP服務激活,如本文所述: http//msdn.microsoft.com/en-us/library/ms731053.aspx

我按如下方式配置了服務:

<endpoint address="net.pipe://myservice"
binding="netNamedPipeBinding"
bindingConfiguration="MyService_NamedPipeBindingConfig"
contract="ICMyService" />

<netNamedPipeBinding>
    <binding name="MyService_NamedPipeBindingConfig"
         maxBufferSize="2147483647"
         maxReceivedMessageSize="2147483647">
        <security mode="None">
            <transport protectionLevel="None" />
        </security>
    </binding>
</netNamedPipeBinding>

當我瀏覽到.svc文件(在IIS上,而不是Visual Studio webserver)時,我收到以下消息:

[InvalidOperationException: The protocol 'net.pipe' is not supported.]
   System.ServiceModel.Activation.HostedTransportConfigurationManager.InternalGetConfiguration(String scheme) +11461251
   System.ServiceModel.Channels.TransportChannelListener.OnOpening() +84
   System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +229
   System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout) +72

[InvalidOperationException: The ChannelDispatcher at 'net.pipe://myservice' with contract(s) '"IMyService"' is unable to open its IChannelListener.]
   System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout) +118
   System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +261
   System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) +107
   System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +261
   System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +121
   System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +479

[ServiceActivationException: The service '/myservicehost/myservice.svc' cannot be activated due to an exception during compilation.  The exception message is: The ChannelDispatcher at 'net.pipe://myservice' with contract(s) '"IMyService"' is unable to open its IChannelListener..]
   System.ServiceModel.AsyncResult.End(IAsyncResult result) +11536522
   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +194
   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +176
   System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +278
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

我希望使用WAS進行更快速,更輕松的部署,但這種例外無濟於事。 有沒有人知道我做錯了什么?

您是否完全遵循該文章,或者您是否使用'net.pipe'替換命令行中的'net.tcp'實例? 可能只是您沒有為該網站和虛擬目錄啟用net.pipe綁定。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM