exceptions

This page tracks unusual exceptions and their fixes.


Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it.

Type: System.Threading.ThreadStateException
Source: System.Windows.Forms
at System.Windows.Forms.ComboBox.set_AutoCompleteMode(AutoCompleteMode value)

at Fiddler.UIAutoResponder.InitializeComponent()

at Fiddler.UIAutoResponder..ctor()

at Fiddler.AutoResponder..ctor()

at Fiddler.frmViewer.RunMain(String[] arrArgs)

at Fiddler.frmViewer.Main(String[] arrArgs)

Fiddler v4.6.1.5 (x64 AMD64) [.NET 4.0.30319.34209 on Microsoft Windows NT 6.1.7601 Service Pack 1]

I have added a .net profiler from the Azure Application Insights monitoring agent as described on this site: http://apmtips.com/blog/2015/01/05/track-dependencies-in-console-application/ . It describes setting some environment variables, to make .net use the AppInsights agent as a profiler so it can inject itself into the monitored applications.
I added the environment variables to the System properties because I needed to add the AppInsights profiling to a Windows Service.

Disabling the system-wide profiling by setting the environment variable COR_ENABLE_PROFILER to 0 makes Fiddler work again.
I’m guessing the AppInsights profiler thread which starts the profiled appliations doesn’t have STAThreadAttribute set, and that causes problems for UI applications.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License