Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 708
  • Last Modified:

DisconnectedContext MDA in Visual Studio 2005

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.
0
kayhustle
Asked:
kayhustle
  • 3
1 Solution
 
kayhustleAuthor 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
0
 
Mikal613Commented:
no problem

0
 
Mikal613Commented:
lets do it!!
0
 
GranModCommented:
PAQ-ing the question and refunding 500 points

Thanks for your comment Mikal613.

GranMod
The Experts Exchange
Community Support Moderator of all Ages
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now