vorrei utilizzare dei servizi wcf per gestire in maniera centralizzata l'interfaccia verso db
per la lettura e scrittura dei dati utilizzato con un applicativo distribuito remotamente.

ho creato una soluzione wcf che viene eseguita tramite un servizio di windows installato con
InstallUtil di vs2010.
Successivamente ho creato un client di tipo windows form che referenzia il servizio ed
utilizza le chiamate alle funzioni esposte dal wcf.
lo scambio dei dati dovrebbe avvenire tramite protocollo "net.tcp" perchè non ho possibilità di
installare IIS sulle macchine della mia rete.

seguendo dei tutorials, sono riuscito a creare un ambiente demo ed è tutto funzionante se
l'applicazione client viene eseguita nella stessa macchina dove gira il servizio.
sorgono problemi di autorizzazioni nel caso il client venga eseguito su una macchina remota.

il file config del client è:

codice:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <netTcpBinding>
                <binding name="TcpEndPoint" closeTimeout="00:01:00" openTimeout="00:01:00"
                    receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false"
                    transferMode="Buffered" transactionProtocol="OleTransactions"
                    hostNameComparisonMode="StrongWildcard" listenBacklog="10"
                    maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10"
                    maxReceivedMessageSize="65536">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00"
                        enabled="false" />
                    <security mode="Transport">
                        <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
                        <message clientCredentialType="Windows" />
                    </security>
                </binding>
            </netTcpBinding>
        </bindings>
        <client>
            <endpoint address="net.tcp://[IP SERVER WCF]:9292/Service1/" binding="netTcpBinding"
                bindingConfiguration="TcpEndPoint" contract="ServiceReference1.IService1"
                name="TcpEndPoint">
                <identity>
                    <userPrincipalName value="[Nome server]\[Default user]" />
                </identity>
            </endpoint>
        </client>
    </system.serviceModel>
</configuration>


il file config del servizio di windows è:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>

  <system.web>
    <compilation debug="true" />
  </system.web>
  <system.serviceModel>
    <services>
      <service name="WcfMySample.Service1" behaviorConfiguration ="MyBeh">
        <host>
          <baseAddresses>
            <add baseAddress = "net.tcp://[IPSERVER]:9000/Service1/" />
          </baseAddresses>
        </host>
        <endpoint name="TcpEndPoint"
          address ="" 
          binding="netTcpBinding" 
          contract="WcfMySample.IService1">
        </endpoint>
        <endpoint name="MetaDataTcpEndPoint"
          address="mex"
          binding="mexTcpBinding"
          contract="IMetadataExchange">
        </endpoint>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name ="MyBeh">
          <serviceMetadata httpGetEnabled="False"/>
          <serviceDebug includeExceptionDetailInFaults="False" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

</configuration>


il file config del wcf è:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>

  <system.web>
    <compilation debug="true" />
  </system.web>
  <system.serviceModel>
    <services>
      <service name="WcfMySample.Service1" behaviorConfiguration ="MyBeh">
        <host>
          <baseAddresses>
            <add baseAddress = "net.tcp://localhost:9292/Service1/" />
          </baseAddresses>
        </host>
        <endpoint name="TcpEndPoint"
          address ="" 
          binding="netTcpBinding" 
          contract="WcfMySample.IService1">
        </endpoint>
        <endpoint name="MetaDataTcpEndPoint"
          address="mex"
          binding="mexTcpBinding"
          contract="IMetadataExchange">
        </endpoint>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name ="MyBeh">
          <serviceMetadata httpGetEnabled="False"/>
          <serviceDebug includeExceptionDetailInFaults="False" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

</configuration>


grazie 1000 per l'aiuto.