System.Transaction

A

Andrew Robinson

I am receiving an exception while trying to use a TransactionScope. My code
is as follows:

using (TransactionScope scope = new TransactionScope()) {
equipment.Save();
status.Save();

scope.Complete();
}

This code is pretty basic and calls some dynamic sql updates using two
different connections to the same sql server. The sql server is located on a
different machine than my local dev box. My local dev box is running Vista
RTM and the SQL server is running on W2003. I can't see any issues with
configuration on the SQL server box and am guessing that the issue is on my
local Vista box.

the exception is:

TransactionmanagerCommunicationException: 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.

Don't know if it matters or not but the sql server is part of a domain. My
local box is not a member of the domain and I am using SQL authentication
(successfully with the exception of the transaction issue).

Any help would be appriciated.

Thanks,
 
W

WenYuan Wang [MSFT]

Hello Andrew,

According to your description, I understand you face an issue that the
TransactionScope (ADO.net 2.0) throw an exception when you connect SQL 2005
database out of domain. Please let me know if I misunderstood anything
here. Thanks.

It is a DTC configuration issue. I notice there is a post in MSDN forum.
Eric has met a similar issue as your. You may check.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=230390&SiteID=1
[The partner transaction manager has disabled its support for
remote/network transactions]

First verify the "Distribute Transaction Coordinator" Service is running on
both database server computer and client computers
1. Go to "Administrative Tools > Services"
2. Turn on the "Distribute Transaction Coordinator" Service if it is
not running

If it is running and client application is not on the same computer as the
database server, on the computer running database server
1. Go to "Administrative Tools > Component Services"
2. On the left navigation tree, go to "Component Services > Computers
My Computer" (you may need to double click and wait as some nodes need
time to expand)
3. Right click on "My Computer", select "Properties"
4. Select "MSDTC" tab
5. Click "Security Configuration"
6. Make sure you check "Network DTC Access", "Allow Remote Client",
"Allow Inbound/Outbound", "Enable TIP" (Some option may not be necessary,
have a try to get your configuration)
7. The service will restart
8. BUT YOU MAY NEED TO REBOOT YOUR SERVER IF IT STILL DOESN'T WORK

Bill also wroted an article mentioned about Vista and Windows 2000. You may
refer.
http://blogs.msdn.com/bill/archive/2006/12/12/using-msdtc-between-vista-clie
nts-and-windows-2000-servers.aspx
[Using MSDTC between Vista clients and Windows 2000 servers]

Hope this helps. Please feel free to let me know if you still meet any
further issue. Thanks.
Sincerely,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

WenYuan Wang [MSFT]

Hello Andrew,

This is Wen Yuan. I just want to check if you have resolved the issue?
Please let me know if it still persists or there is anything we can help
with. I'm glad to assist you.

Have a nice day.
Sincerely,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

WenYuan Wang [MSFT]

Hello Andy,

Aha, Great Thanks for your reply.
If you meet any further issue, please let me know . I'm glad to assist.

Have a great day,
Sincerely,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top