简体   繁体   English

插件 DLL 被 w3wp.exe 锁定

[英]Plugin DLL locked by w3wp.exe

Dynamics CRM 2011 on premise.内部部署 Dynamics CRM 2011。

I have a registered plugin DLL that is called when the case/incident entity is created.我有一个注册的插件 DLL,在创建案例/事件实体时调用它。

An exception is raised when this happens.发生这种情况时会引发异常。 I am investigating this.我正在调查此事。

The plugin is on disk (C:\\Program Files\\Microsoft Dynamics CRM\\Server\\bin\\assembly) and I have to update it manually when I want to change the code.该插件在磁盘上(C:\\Program Files\\Microsoft Dynamics CRM\\Server\\bin\\assembly),当我想更改代码时必须手动更新它。 (This situation was created before me and I won't change it now.) (这种情况是在我之前创造的,我现在不会改变它。)

Whenever the exception is raised, the DLL becomes locked and the only way I can find to overwrite it is to restart IIS.每当引发异常时,DLL 都会被锁定,我能找到覆盖它的唯一方法是重新启动 IIS。

How can I unlock the file without restarting IIS?如何在不重新启动 IIS 的情况下解锁文件?

Responses to answers对答案的回应

Which application pool?哪个应用程序池?在此处输入图片说明

None of the pools list the location of the DLL in this list:没有一个池在此列表中列出 DLL 的位置:在此处输入图片说明

The DLL is in C:\\Program Files\\Microsoft Dynamics CRM\\Server\\bin\\assembly DLL 位于 C:\\Program Files\\Microsoft Dynamics CRM\\Server\\bin\\assembly

Recycle the App pool.回收应用程序池。 When you recycle the app pool, it'll start up a new one right away, and let the old one finish up, eventually killing any threads that don't finish in a configured amount of time.当您回收应用程序池时,它会立即启动一个新的应用程序池,并让旧的应用程序池完成,最终杀死所有未在配置的时间内完成的线程。 That should allow you to not have to kill all of ISS.这应该让你不必杀死所有的 ISS。 Just make sure you wait long enough for the w3wp worker process to die.只要确保您等待 w3wp 工作进程死亡的时间足够长。

Just rename the dll which is currently in use and dump the new new dll there.只需重命名当前正在使用的 dll 并将新的新 dll 转储到那里。 It worked for me.它对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM