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
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