0

Friends,

I have an IIS hosted web service (

http://localhost/Directory.Server/Services/v2/Directory.svc/ws

) that works with wsHttpBinding. It is consumed by a WebApp. I need an additional endpoint for the same service with named pipe so that I can access the service from another project running on the same machine.

I made the changes in web.config to expose the namedpipe endpoint. But, even before I test the new namedpipe endpoint, the existing wsHttpBinding endpoint started throwing error with this change.

Error from the consuming WebApp - The requested service, '' could not be activated. See the server's diagnostic trace logs for more information.

There is no doubt that the addition of namedpipe endpoint is causing the issue. If I fix the namedpipe issue, both endpoints will work.

Here are my web.config changes -

  <system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<bindings>
  <wsHttpBinding>
    <binding name="wsHttp" maxBufferPoolSize="524288" maxReceivedMessageSize="10485760" messageEncoding="Mtom">
      <readerQuotas maxDepth="0" maxStringContentLength="0" maxArrayLength="0" maxBytesPerRead="0" maxNameTableCharCount="0" />
      <security mode="None">
        <transport clientCredentialType="None" />
        <message clientCredentialType="None" />
      </security>
    </binding>
  </wsHttpBinding>
  <netNamedPipeBinding>
    <binding name="Binding10" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="10485760">
      <security mode="Transport">
        <transport protectionLevel="EncryptAndSign"/>
      </security>
    </binding>
  </netNamedPipeBinding>
</bindings>
<behaviors>
  <serviceBehaviors>
    <behavior name="Default_Directory">
      <dataContractSerializer maxItemsInObjectGraph="2147483647" />
      <serviceMetadata httpGetEnabled="true" httpsGetEnabled="false" />
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
    <behavior name="">
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="false" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<services>
  <service behaviorConfiguration="Default_Directory" name="Directory.Server.Services.v2.Directory">
    <endpoint address="ws" binding="wsHttpBinding" bindingConfiguration="wsHttp" name="wsHttp_Directory" contract="Directory.Server.Services.v2.IDirectory" />
    <endpoint address="mex" binding="mexHttpBinding" name="mex_Directory" contract="IMetadataExchange" />
    <endpoint address="net.pipe://localhost/Directory.Server/Services/v2/Directory.svc/np" binding="netNamedPipeBinding" bindingConfiguration="Binding10" name="namedPipe_Directory" contract="Directory.Server.Services.v2.IDirectory" />
  </service>
</services>

What am I doing wrong? Pls help.

Pialy Tapaswi
  • 521
  • 7
  • 9

1 Answers1

1

Is WAS enabled on IIS? Named pipes require WAS to be enabled. Reference - http://msdn.microsoft.com/en-us/library/ms752253.aspx

vibhu
  • 1,657
  • 2
  • 15
  • 19
  • Using IIS 8 running on Windows 8, I think WAS is enabled by default. In the web service project, under Project properties pane - "Use Local IIS server" is chosen since the project was exposing HTTP based services only earlier. The Project URL is set as - http//localhost/Directory.Server . Could this be the issue? – Pialy Tapaswi Jul 17 '13 at 21:14