Home     Products      Support      Corporate     Sign In 
Support Knowledge Base, Article 639
Product
ImgWriter
Title
ImgWriter fails to stream an image to the browser in the ASP.NET environment.
Problem

ImgWriter is dependent on the intrinsic ASP objects and requires that ASP compatibility is set when used in ASP.NET.

The .NET Runtime gives the following error message:

Operation failed. 

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.Runtime.InteropServices.COMException: Operation failed
Solution

In order to stream the image to the browser, ImgWriter needs to utilize to the Response object of ASP. This requires that in ASP.NET scripts, the AspCompat attribute of the Page directive needs to be set to "true".

<%@Page aspcompat=true >

For further reading on COM component compatibility in ASP.NET and the use of the AspCompat attribute, please see: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcomcomponentcompatibility.asp

Created : 6/26/2003 1:56:30 PM (last modified : 6/26/2003 1:56:20 PM)
Rate this article!
Comments