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.