Home › Forums › TWAIN Classic › Could not instantiate Web Twain ActiveX control
- This topic has 0 replies, 1 voice, and was last updated 17 years, 11 months ago by islam123.
- AuthorPosts
when I try to crate object to get Image the Application throws Exception below:
Could not instantiate ActiveX control ‘ffc6f181-a5cf-4ec4-a441-093d7134fbf2’ because the current thread is not in a single-threaded apartment.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Threading.ThreadStateException: Could not instantiate ActiveX control ‘ffc6f181-a5cf-4ec4-a441-093d7134fbf2’ because the current thread is not in a single-threaded apartment.
Source Error:
Line 24:
Private Sub InitializeComponent()
Line 25: Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(scan))
Line 26: Me.WebTwain = New AxDYNAMICWEBTWAINCTRLLib.AxDynamicWebTwain // throws the Exception
Line 27: CType(Me.WebTwain, System.ComponentModel.ISupportInitialize).BeginInit()
Line 28:tell me please how can I solve this problem by programming.
thanks.
- AuthorPosts