2
votes

I've a .net 3.5 windows service which uses msmq running on 2008 application server.This service communicates with the sql 2005 database on the database server.

Am getting an error mentioned below on calling this service from my aspx page on 2008 web server:

"Network access for Distributed Transaction Manager (MSDTC) has been disabled. Please enable DTC for network access in the security configuration for MSDTC using the Component Services Administrative tool. The transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D024)"

I followed this instruction, but no luck.

When I debug the code, above error is thrown at a line in my windows service code where its trying to execute stored procedure using ExecuteNonQuery method.

What am i missing here?

FYI, my web.config on the web server looks like:

<netMsmqBinding>
    <binding name="NetMsmqBinding_IWcfEmailService" closeTimeout="00:01:00"
        openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
        deadLetterQueue="System" durable="true" exactlyOnce="true"
        maxReceivedMessageSize="5000000" maxRetryCycles="2"
        receiveErrorHandling="Fault"
        receiveRetryCount="5" retryCycleDelay="00:30:00" timeToLive="1.00:00:00"
        useSourceJournal="false" useMsmqTracing="false" queueTransferProtocol="Native"
        maxBufferPoolSize="524288" useActiveDirectory="false">
      <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
          maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      <security mode="None">
        <transport msmqAuthenticationMode="WindowsDomain"
            msmqEncryptionAlgorithm="RC4Stream"
            msmqProtectionLevel="Sign" msmqSecureHashAlgorithm="Sha1" />
        <message clientCredentialType="Windows" />
      </security>
    </binding>
</netMsmqBinding>
3

3 Answers

1
votes

You need to enable msdtc. See:

How do I enable MSDTC on SQL Server?

You must also say to SQL Server that it should allow connections (remote TCP?). That can be done from the SQL Server Surface Area Configuration.

0
votes

I assume you have enabled the DTC for remote access ...

Administrative Tools –> 
Component Services –> 
My Computer properties –>
MSDTC tab –> 
Security Configuration tab –>
Network DTC Access (checked) 

If so, here's a handy DTC troubleshooting guide. It's BizTalk centric, but the concepts are the same.

-1
votes

have you tried enabled network access on the db server as well? There are also several options on the connection you can specify to control how the driver participates in transactions.