Does ReportViewer run in a separate AppDomain?

爷,独闯天下 提交于 2020-01-05 06:26:25

问题


I am running a report in a WinForms application using the report viewer in Local mode. The problem I'm running into is that from the report I'm accessing an object that was created using the Singleton pattern; this object is instanciated and initialized when the WinForms application launches but the report creates a new instance because it does not see that the instance was already created by the WinForms application.

Any ideas what could be happening? Thanks


回答1:


After doing some more research I found that the ReportViewer does run under a separate AppDomain; this means that a new instance of the Singleton class will be created as the memory space used by the static instance is per AppDomain



来源:https://stackoverflow.com/questions/13665915/does-reportviewer-run-in-a-separate-appdomain

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!