Note that there are some explanatory texts on larger screens.

plurals
  1. POHosting WCF service on IIS
    text
    copied!<p>I am trying to host a WCF service using IIS, (works fine in Cassini). However when I host it in IIS I get the following error: </p> <p>"A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)" </p> <p>I thought this might be due to IIS and windows authentication, so I changed the connectionstring to directly login to the database with a uid and password, makes no difference. I don't think I am getting that far, as I would expect a sql security error if that were the case.</p> <p>I have set up a brand new server (2008), and still I get the same issues... </p> <p>What setting to I need to implement to get this going?</p> <p><strong>Example WCF Code</strong></p> <pre><code>private GenericDataClassesDataContext _db = new GenericDataClassesDataContext(); public ReferenceValue[] GetReferenceValues() { try { return _db.ReferenceValues.ToArray(); } catch (Exception e) { throw new FaultException(e.Message); } } </code></pre> <p><strong>Web.Config</strong></p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;configuration&gt; &lt;appSettings/&gt; &lt;connectionStrings&gt; &lt;!--&lt;add name="TtasConnectionString" connectionString="Data Source=stdev07;Initial Catalog=Ttas;;uid=srvTtas;pwd=pa$$w0rd;MultipleActiveResultSets=True" providerName="System.Data.SqlClient"/&gt;--&gt; &lt;add name="TTASConnectionString" connectionString="Data Source=STDEV07;Initial Catalog=IRF;Integrated Security=SSPI" providerName="System.Data.SqlClient"/&gt; &lt;/connectionStrings&gt; &lt;system.web&gt; &lt;compilation debug="true" targetFramework="4.0"&gt; &lt;/compilation&gt; &lt;authentication mode="Windows"/&gt; &lt;identity impersonate="true"/&gt; &lt;pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/&gt;&lt;/system.web&gt; &lt;system.serviceModel&gt; &lt;extensions&gt; &lt;behaviorExtensions&gt; &lt;add name="silverlightFaults" type="Moe.Tactical.GenericData.Wcf.SilverlightFaultBehavior, Moe.Tactical.GenericData.Wcf, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" /&gt; &lt;/behaviorExtensions&gt; &lt;/extensions&gt; &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true"/&gt; &lt;behaviors&gt; &lt;endpointBehaviors&gt; &lt;behavior name="SilverlightFaultBehavior"&gt; &lt;silverlightFaults /&gt; &lt;/behavior&gt; &lt;/endpointBehaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="Moe.Tactical.GenericData.Wcf.GenericDataServiceBehavior"&gt; &lt;serviceMetadata httpGetEnabled="true" /&gt; &lt;!--&lt;serviceDebug includeExceptionDetailInFaults="false" /&gt;--&gt; &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;bindings&gt; &lt;basicHttpBinding&gt; &lt;binding name="winAuthBasicHttpBinding"&gt; &lt;security mode="TransportCredentialOnly"&gt; &lt;transport clientCredentialType="Ntlm"/&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/basicHttpBinding&gt; &lt;/bindings&gt; &lt;services&gt; &lt;service behaviorConfiguration="Moe.Tactical.GenericData.Wcf.GenericDataServiceBehavior" name="Moe.Tactical.GenericData.Wcf.GenericDataService"&gt; &lt;!--bindingConfiguration="winAuthBasicHttpBinding" [in gap]--&gt; &lt;endpoint address="" binding="basicHttpBinding" behaviorConfiguration="SilverlightFaultBehavior" contract="Moe.Tactical.GenericData.Wcf.IGenericDataService"&gt; &lt;identity&gt; &lt;dns value="localhost:3637"/&gt; &lt;/identity&gt; &lt;/endpoint&gt; &lt;!--&lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/&gt;--&gt; &lt;/service&gt; &lt;/services&gt; &lt;/system.serviceModel&gt; &lt;/configuration&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload