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:
"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.)"
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.
I have set up a brand new server (2008), and still I get the same issues...
What setting to I need to implement to get this going?
Example WCF Code
private GenericDataClassesDataContext _db = new GenericDataClassesDataContext();
public ReferenceValue[] GetReferenceValues()
{
try
{
return _db.ReferenceValues.ToArray();
}
catch (Exception e)
{
throw new FaultException(e.Message);
}
}
Web.Config
<?xml version="1.0"?>
<configuration>
<appSettings/>
<connectionStrings>
<!--<add name="TtasConnectionString" connectionString="Data Source=stdev07;Initial Catalog=Ttas;;uid=srvTtas;pwd=pa$$w0rd;MultipleActiveResultSets=True" providerName="System.Data.SqlClient"/>-->
<add name="TTASConnectionString" connectionString="Data Source=STDEV07;Initial Catalog=IRF;Integrated Security=SSPI" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0">
</compilation>
<authentication mode="Windows"/>
<identity impersonate="true"/>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/></system.web>
<system.serviceModel>
<extensions>
<behaviorExtensions>
<add name="silverlightFaults" type="Moe.Tactical.GenericData.Wcf.SilverlightFaultBehavior, Moe.Tactical.GenericData.Wcf, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</behaviorExtensions>
</extensions>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
<behaviors>
<endpointBehaviors>
<behavior name="SilverlightFaultBehavior">
<silverlightFaults />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="Moe.Tactical.GenericData.Wcf.GenericDataServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<!--<serviceDebug includeExceptionDetailInFaults="false" />-->
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="winAuthBasicHttpBinding">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Ntlm"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="Moe.Tactical.GenericData.Wcf.GenericDataServiceBehavior" name="Moe.Tactical.GenericData.Wcf.GenericDataService">
<!--bindingConfiguration="winAuthBasicHttpBinding" [in gap]-->
<endpoint address=""
binding="basicHttpBinding"
behaviorConfiguration="SilverlightFaultBehavior"
contract="Moe.Tactical.GenericData.Wcf.IGenericDataService">
<identity>
<dns value="localhost:3637"/>
</identity>
</endpoint>
<!--<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>-->
</service>
</services>
</system.serviceModel>
</configuration>