I am developing a web application in C# with VS 2012.
I have a fingerprint sensor with his dll in Windows Forms format. I am developing a web application, so I need to communicate the two projects.
But the fingerprint sensor needs an STAThread environment, as the windows forms one. How can I set the STAThread to a WebForm? I try this
[STAThread]
protected void Page_Load(object sender, EventArgs e)
{
//code of fingerprint
}
but didn't work, I've got the exception ThreadStateException which says that the subprocess is not in a container of single-threaded. Help me! Thanks!