WCF windows service issue with MSDTC

2

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>
c#
wcf
windows-services
msdtc
asked on Stack Overflow Apr 7, 2009 by (unknown user) • edited Aug 17, 2009 by John Saunders

3 Answers

1

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.

answered on Stack Overflow Jun 26, 2009 by Shiraz Bhaiji • edited May 23, 2017 by Community
0

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.

answered on Stack Overflow Jun 26, 2009 by JP Alioto
-1

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.

answered on Stack Overflow Apr 8, 2009 by Adam Fyles

User contributions licensed under CC BY-SA 3.0