STA COM in ASP.net

A frequent asked question when using HtmlCapture in ASP.net is how to set the apartment state of IIS’s worker thread to STA (HtmlCapture runs only in STA thread).

There are three  known methods to do that. But the simplest one is adding AspCompat=true to an <%@ Page > tag on your ASP.NET page, as shown in the following code.

<%@ Page AspCompat=”true” Language=”C#” %>

Leave a Reply

You must be logged in to post a comment.