What are the advantages and disadvantages of using the GAC?

前端 未结 7 1579
心在旅途
心在旅途 2020-11-27 03:49

And on top of that, are there cases where one has to use the global assembly cache or where one cannot use it?

7条回答
  •  借酒劲吻你
    2020-11-27 04:38

    The GAC runs with Full Trust and can be used by applications outside of your Web App. For example, Timer Jobs in Sharepoint HAVE to be in the GAC because the sptimer service is a separate process.

    The "Full Trust" Part is also a possible source for security issues. Sure, you can work with Code Access Security, but I do not see too many Assemblies using CAS unfortunately :( The /bin Folder can be locked down to Medium which is normally fine.

    Daniel Larson has a post on CAS as well which details the differences a bit more.

提交回复
热议问题