c# - ActiveX control -Single-threaded apartments -


i'd downloaded facebook-csharp-sdk/facebook-winforms-sample project example,

this project working when testing, created new project follow exmaple steps.

i error message when testing on new project.

line : webbrowser1 = new system.windows.forms.webbrowser(); 

error message :

activex control '8856f961-340a-11d0-a96b-00c04fd705a2' cannot instantiated because current thread not in single-threaded apartment.this

  1. check whether ur main() function has [stathread] attribute

  2. check whether u r using following line inside method called multiple times.

line : webbrowser1 = new system.windows.forms.webbrowser();


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -