2009-06-28 73 views
3

我想通过我的web应用程序创建站点缩略图,所以我想我会使用WebBrowser控件。但是,我得到一个错误:在ASP.NET应用程序中使用Web浏览器控件

System.Threading.ThreadStateException: ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' cannot be instantiated because the current thread is not in a single-threaded apartment.

我尝试设置当前线程:

Thread.CurrentThread.ApartmentState = ApartmentState.STA

但是这并没有帮助。

是不是可以在ASP.NET中使用WebBrowser控件?

回答

相关问题