Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9198061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:12:06+00:00 2026-06-17T22:12:06+00:00

I am seeing the following error when I attempt to open the second connection

  • 0

I am seeing the following error when I attempt to open the second connection in the code below: 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.

Public Function Test()
        Using Scope = New TransactionScope
            getMailServer()
            getMailServer()
        End Using
    End Function

    Private Function getMailServer() As String
        Dim objCommand As SqlCommand, objCommand2 As SqlCommand
        Dim objCon As SqlConnection
        Dim intDeleteCount As Integer
        Dim objDR As SqlDataReader
        Dim strServer As String
        Try
            objCommand = New SqlCommand
            objCommand2 = New SqlCommand
            objCon = New SqlConnection(_ConString) 'taken from web.config
            objCon.Open()
            objCommand.Connection = objCon
            Using objCon
                Using objCommand
                    objCommand2.Connection = objCon
                    objCommand2.CommandText = "SELECT SMTPServer FROM dbServer"
                    objDR = objCommand2.ExecuteReader
                    Do While objDR.Read
                        strServer = objDR("SMTPServer")
                    Loop
                    objDR.Close()
                End Using
            End Using
            Return strServer
        Catch ex As Exception
            Throw
        Finally

        End Try

    End Function

Please note that I have spent some time Googling this and I have tried a few things posted on this website e.g. restarting the districuted transaction coordinator in Services. I did also read somewhere that using TransactionScope should be avoided with distributed transactions (those with multiple connection objects). I am not sure if this is true.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T22:12:07+00:00Added an answer on June 17, 2026 at 10:12 pm

    You can use TransactionScope for distributed transactions. In fact, by introducing TransactionScope in .NET 2.0, Microsoft put COM+ out of its misery. It was a very good move, COM+ was awful.

    You need to configure DTC for network access on all machines participating in the transaction – the one running your code, as well as those running the databases (or other resources you may be using, such as MSMQ).

    Here’s how to enable DTC network access.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I keep seeing the following error when I attempt to launch a lightbox: Error:
I'm very infrequently seeing the following error logged on a website I manage: Arguments
I'm looking at some open source projects and I'm seeing the following: NSLog(@%s w=%f,
In preparing to a OOP exam, I enjoyed seeing g++ compile the following code
Why am I seeing the following error when running mogenerator to generator class files
I'm getting an error on compile with the following code. I'm trying to call
I am getting the following error when using Windows 7. I started seeing this
We are currently seeing the following error in our Oracle listener log. There are
I'm seeing the following error coming from WCF when trying to hit my REST
Seeing the following syntax error, but the urls.py file seems to be correct. What

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.