views:

18

answers:

0

I have a windows XP machine CompA in which I have windows form application that is acting as client that will access WCF service operations installed on CompB which runs windows 2008 server. For testing purpose I have only one service on CompB with has a simple operation called WriteName that writes to a single field in a table in the oracle database. The oracle database is physically located in a separate PC in the same netweork.

I am trying to enable transaction between CompA and CompB through MSDTC. When I start the client and connect to the service on CompB, I can see the transaction initiated both on CompA and CompB, but the service operation in CompB never gets called. I can see the windows form on client in freeze state. After 3 mintues, I get this error

The flowed transaction could not be unmarshaled. The following exception occurred: Communication with the underlying transaction manager has failed.

On both the computers I have configured MSDTC as follows. I am using C# 3.0.

CompA

MSTDC Tab

Use local coordinator – checked

Under security configuration of MSDTC

Network DTC Access – checked Client And Administration Allow Remote clients – checked Transaction Manager Communication Allow Inbound - checked Allow Outbound – checked

No authentication required – radio button selected

Enable Transaction Protocol TIP Transactions – checked

CompB

MSTDC Tab

Use local coordinator – checked

Under security configuration of MSDTC

Network DTC Access – checked Client And Administration Allow Remote clients – checked Transaction Manager Communication Allow Inbound - checked Allow Outbound – checked

No authentication required – radio button selected

Following is the configuration details on both server.

I haven’t been able to fix this error. Please help

CompA (Running windows client)

App.config file

<endpoint address="net.tcp://192.168.10.70:8020/Test"
                binding="netTcpBinding" contract="IMyService" name="CompanyNetTcpEndPoint" bindingConfiguration="TestBinding" />


<bindings>      
      <netTcpBinding>
        <binding name="TestBinding" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" transactionFlow="true"    maxBufferPoolSize="524288" maxBufferSize="2147483647" maxConnections="100"
         maxReceivedMessageSize="2147483647" portSharingEnabled="false">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
           maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
          <security mode="Transport">
            <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
            <message clientCredentialType="Windows" />
          </security>
        </binding>
      </netTcpBinding>
    </bindings> 

CompB (Server Running windows 2008)

Service.config

<endpoint address="Test"
          binding="netTcpBinding"
          contract="IMyService"
          name="TestNetTcpEndPoint" bindingConfiguration="TestBinding"/>

<netTcpBinding>   
  <binding name="TestBinding" openTimeout="00:10:00" transactionFlow="true" 
   maxBufferPoolSize="524288" maxBufferSize="2147483647" maxConnections="100"
   maxReceivedMessageSize="2147483647" portSharingEnabled="false">
   <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
    maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
   <security mode="Transport">
    <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
    <message clientCredentialType="Windows" />
   </security>    
  </binding>
</netTcpBinding>

From the client I am using the following code

using (TransactionScope trnx = new TransactionScope(TransactionScopeOption.Required))
             {
//..... code to access service operation...//              
  trnx.Complete();
               }

If I comment the code statement using (TransactionScope)... the service operation gets called.