Cross-thread operation not valid

Hi

I have an asp.net application - depending on parameters passed in the request a different report is invoked and the results returned as a pdf file.

Because of the overhead in creating and loading reports, I am storing them in the httpruntime cache.

When a request is received, the code checks to see if the required report type is in the cache, if so it is returned. If not the report is created, loaded from file and added to the cache.

In all cases Prepare is called on the report prior to exporting data to pdf.

Ocassionally the web server will return the following error

Cross-thread operation not valid: Control '' accessed from a thread other than the thread it was created on


What is causing this and how do I resolve it ?

Thanks

D

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.