It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming ASP & ASP.NET Forum

Converting ASP.Net to .Net 4.0 throws MSDTC error

Converting ASP.Net to .Net 4.0 throws MSDTC error

Postby mellomel70 on Thu Dec 08, 2011 5:47 pm

Hi - I've just converted an ASP.Net 2.0 solution to 4.0. In general, it seems to work fine, but there's one point in the code that consistently throws an error on 2 Windows 7 machines, one 32-bit, one 64-bit. The same code works fine on a Windows 2003 machine in the 2.0 framework. Note that both versions are being run through Visual Studio, the 2.0 version in VS2005, the 4.0 version in VS2010. I also get the same error message if I publish the 4.0 version to a Windows 7 machine and run it from IIS or in the browser (IE9). The code that breaks is as follows:
Code: Select all
string strSelect = "SELECT * FROM Tasks WHERE UserID = " + UserID + " AND ClsdDate IS NULL AND Task LIKE 'Employee Move - " + RequestItemName + "%'";                     

SqlConnection dsConn = new SqlConnection(ConfigurationManager.AppSettings["DSN_TRACKIT"].ToString());

SqlDataAdapter dsDataAdapter = new SqlDataAdapter(strSelect, dsConn);

SqlCommandBuilder dsCommandBuilder = new SqlCommandBuilder(dsDataAdapter);

dsDataAdapter.UpdateCommand = dsCommandBuilder.GetUpdateCommand();

dsDataAdapter.Fill(dsTrackit,"MoveTasks");



The error message is:



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



Note that the code does not involve a transaction, or more than one SQL Server and my DBA swears that DTC is enabled on ALL SQL Servers involved in this solution.



So what's going on here? I've googled the error message, but I've seen nothing that could explain this. I don't know if this is a Windows 7 issue or a .Net 4.0 issue.



Thanks!
mellomel70
 
Posts: 3
Joined: Tue Aug 02, 2011 2:50 pm

Who is online

Users browsing this forum: No registered users and 0 guests