asp.net - Network access for Distributed Transaction Manager (MSDTC) has been disabled -
error:
network access distributed transaction manager (msdtc) has been disabled. please enable dtc network access in security configuration msdtc using component services administrative tool.
using (system.transactions.transactionscope ts = new system.transactions.transactionscope()) 11 { 12 try 13 { 14 foreach (datarow row in this.dt1.rows) 15 { 16 int titleid = int.parse(row["titleid"].tostring()); 17 string fname = row["fname"].tostring(); 18 string lname = row["lname"].tostring(); 19 20 if (cmd.parameters.count > 0) 21 cmd.parameters.clear(); 22 23 cmd.parameters.addwithvalue("@titleid", titleid); 24 cmd.parameters.addwithvalue("@fname", fname); 25 cmd.parameters.addwithvalue("@lname", lname); 26 cmd.executenonquery(); 27 28 } 29 con.close(); 30 ts.complete(); 31 } 32 catch (exception ex) 33 { 34 35 } 36 } 37 }
to enable network access msdtc on windows vista/7/8 server 2008r2/2012, follow steps below:
click start, click run, type dcomcnfg , click ok open component services.
in console tree, click expand component services, click expand computers, click expand my computer, click expand distributed transaction coordinator , click local dtc.
right click local dtc , click properties display local dtc properties dialog box.
click security tab.
check mark "network dtc access" checkbox.
finally check mark "allow inbound" , "allow outbound" checkboxes.
click apply, ok.
a message pop restarting service.
click ok , that's all.
Comments
Post a Comment