When I developed a site with VS 2008 it happily connected to a the webservice in the solution, then connected to the database (using ADO.Net Entities) and ran my query.
Now I come to rolling out the site. When it connects to the webservice it is connecting as NETWORK SERVICE - which I don't want - I need it to connect as 'MYCREDENTIAS'.
This way when we want to change a users access - it can be done by the network guys - just by adding or removing users from various roles in SQL.
So the question is -
How can I set up an ASP.Net Website and the Service to use MYCREDENTIALS and not NETWORK SERVICE or for that matter changing my connection to use a fixed login - since then we lose the simplicity of the security role setup on SQL.
My system.serviceModel tag from the WCF Service is as follows;
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpEndpointBinding">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="STG.Services.WCF.Formulary.NationalFormularyBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="STG.Services.WCF.Formulary.NationalFormularyBehavior"
name="STG.Services.WCF.Formulary.NationalFormulary">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpEndpointBinding"
name="BasicHttpEndpoint" contract="STG.Services.WCF.Formulary.INationalFormulary">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</service>
</services>
</system.serviceModel>
The WCF Entry in the client website is as follows;
I have also set up both the service and the website to use Integrated Windows authentication and cleared Enable anonymous access.
The connection string to connect the ADO.Net Entities