We help IT Professionals succeed at work.

DisconnectedContext MDA in Visual Studio 2005

kayhustle
kayhustle asked
on
Medium Priority
736 Views
Last Modified: 2009-12-16
I have code that makes a function call using an Invoke method in Reflection.  Inside that function I make a web service call.  Whenever it makes that  web service call I get the MDA exception DisconnectedContext.  I thought I disabled MDAs by adding the MDADisable.reg file to the registry:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework]
"MDA"="0"

However the DisconnectedContext error still throws.
Comment
Watch Question

CERTIFIED EXPERT

Commented:

Author

Commented:
Yeah I read that, it didn't help, I actually figured it out on my own, I changed the main thread apartment from STAThread to MTAThread and the error went away.
Thanks
CERTIFIED EXPERT

Commented:
no problem

CERTIFIED EXPERT

Commented:
lets do it!!
Commented:
PAQ-ing the question and refunding 500 points

Thanks for your comment Mikal613.

GranMod
The Experts Exchange
Community Support Moderator of all Ages

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.