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:

  1. click start, click run, type dcomcnfg , click ok open component services.

  2. in console tree, click expand component services, click expand computers, click expand my computer, click expand distributed transaction coordinator , click local dtc.

  3. right click local dtc , click properties display local dtc properties dialog box.

  4. click security tab.

  5. check mark "network dtc access" checkbox.

  6. finally check mark "allow inbound" , "allow outbound" checkboxes.

  7. click apply, ok.

  8. a message pop restarting service.

  9. click ok , that's all.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -