473,406 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Network access for DTC

Hi folks,
Consider a client program that uses .NET Framework 2.0, and the
Transaction namespace, to do some update/insert against a given
database using the SQL provider:

using (TransactionScope ts = new TransactionScope())
{
//Do some update/insert commands against some tables...
ts.Complete();
}

When the program is run on the same machine that hosts SQL Server 2005,
everything works fine. However, when the client machine is separated
from the hosting SQL Server 2005 machine, the following error occurs:

"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."

Would someone please tell me how am I supposed to fix this problem?
Shouldn't it use the "Lightweight Transaction Manager" (LTM) to do the
work???

Any help would be highly appreciated,

Cheers,
Mehdi

Aug 4 '06 #1
3 5818
mehdi,

No, it shouldn't use the LTM because you are spreading the transaction
across two machines. You are initiating the transaction on the client, and
involving SQL server, which is on another machine, in the transaction, hence
the need for a DTC.

In order to enable this, you need to go to Component Services and find
"My Computer" in the MMC that comes up. Right click on the computer and
select "Properties". This will give you a property sheet that will allow
you enable network access for DTC.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"mehdi_mousavi" <me***********@gmail.comwrote in message
news:11**********************@75g2000cwc.googlegro ups.com...
Hi folks,
Consider a client program that uses .NET Framework 2.0, and the
Transaction namespace, to do some update/insert against a given
database using the SQL provider:

using (TransactionScope ts = new TransactionScope())
{
//Do some update/insert commands against some tables...
ts.Complete();
}

When the program is run on the same machine that hosts SQL Server 2005,
everything works fine. However, when the client machine is separated
from the hosting SQL Server 2005 machine, the following error occurs:

"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."

Would someone please tell me how am I supposed to fix this problem?
Shouldn't it use the "Lightweight Transaction Manager" (LTM) to do the
work???

Any help would be highly appreciated,

Cheers,
Mehdi

Aug 5 '06 #2
* Nicholas Paldino [.NET/C# MVP] wrote, On 5-8-2006 5:24:
mehdi,

No, it shouldn't use the LTM because you are spreading the transaction
across two machines. You are initiating the transaction on the client, and
involving SQL server, which is on another machine, in the transaction, hence
the need for a DTC.
It should use the LTM, but it probably isn't because he's using more
than one connection to the database. As long as you're using one
tconnaction per transaction, it should still use LTM.
Do it like this:

using (SqlConnection conn = new SqlConnection(connectionstring))
{
conn.Open();
using (TransactionScope ts = new TransactionScope())
{
tableAdapterA.Connection = conn;
tableAdapterA.SaveTable();

tableAdapterB.Connection = conn;
tableAdapterB.SaveTable();

ts.Complete();
}
}
And you won't be needing DTC at all. Let alone anable potentially
dangarous (they're disabled for a reason) network access to DTC.

Jesse Houwing
Aug 5 '06 #3
Are you sure you only open a single connection in te transaction scope? If
you open multiple connections in the same transaction scope SqlClient will
promote your LWPT to a DTC transaction.

Willy.


"mehdi_mousavi" <me***********@gmail.comwrote in message
news:11**********************@75g2000cwc.googlegro ups.com...
| Hi folks,
| Consider a client program that uses .NET Framework 2.0, and the
| Transaction namespace, to do some update/insert against a given
| database using the SQL provider:
|
| using (TransactionScope ts = new TransactionScope())
| {
| //Do some update/insert commands against some tables...
| ts.Complete();
| }
|
| When the program is run on the same machine that hosts SQL Server 2005,
| everything works fine. However, when the client machine is separated
| from the hosting SQL Server 2005 machine, the following error occurs:
|
| "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."
|
| Would someone please tell me how am I supposed to fix this problem?
| Shouldn't it use the "Lightweight Transaction Manager" (LTM) to do the
| work???
|
| Any help would be highly appreciated,
|
| Cheers,
| Mehdi
|
Aug 5 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

36
by: Thomas | last post by:
after spending countless hours trying, i give up and hope to get some help in here. on server1 i got the web myweb.com with my test.asp. in the test.asp, i'm trying to read a file from an UNC...
10
by: MHenry | last post by:
Hi, We were going merrily along for 6 years using this database to record all client checks that came into our office, including information about what the checks were for. Suddenly, network...
3
by: Bonj | last post by:
I need to write a windows service, and the only way it can access a shared drive on a file server on the network is if the installer is put in "User" mode - "LocalService", "LocalSystem" and...
1
by: brian.oneil2 | last post by:
Is there a way to install this onto a network file share and allow a team to access it? I would say share a CD from a networked CD drive, but there are multiple CD's that would have to be inserted....
8
by: Lam | last post by:
HI anyone knows how can I open a mapped network file in C#? I try string file = @"T:\file.txt"; it shows me the error: "Could not find a part of the path" but if I copy the file to my C dirve,...
5
by: Nirosh | last post by:
Hi All, Can any one suggest me a best way to do this .. I have a thrid party tool "EXE" that we need to use with our web service to manipulate some complex XML files, which reside in a...
5
by: Dave Kolb | last post by:
Is there any other solution for an ASPNET application to access network resources other than running as SYSTEM, using delegation (a nightmare to get to work) or the COM+ solution? I cannot seem to...
3
by: LucaBrasi | last post by:
I am curious about how Access 2000 handles network requests for data. I have the data on a back-end server, and the front-end is installed on the local machine. Now, lets say I have a select query...
1
by: 33223 | last post by:
Local Area Network (LAN) Both an EtherNet (wire) network and a wireless network are referred to as a Local Area Network (LAN). A wireless network does not require hubs, switchers, or routers to...
10
by: gary0gilbert | last post by:
An unusual spin to this recurring disk or network error in a Terminal Server environment. Access 2000, Terminal Server 2000, file server is windows 2000. All users have a separate copy of the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.