簡體   English   中英

由於“ bin的更改”,阻止ASP.Net回收應用程序池

[英]Stop ASP.Net from recycling app pool due to “changes to the bin”

問候,我有一個大型的.Net Web應用程序,該應用程序在具有基於NAS的代碼的刀片服務器場上運行。 偶爾,nas響應時間的細微波動會導致.NET認為bin中的某些內容已更改,從而開始了應用程序池的回收。 實際上沒有發生任何變化。 有沒有一種方法可以禁用.Net對bin更改的監視?

這將結束它。 現在,您必須執行iisreset來回收您的應用程序池。

'This is supposed to turn off the monitoring for directory deletes
'See https://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=240686
'This incurs the penalty of an IISRESET or manually restarting the containing AppPool after every upgrade.
Dim pi As PropertyInfo
Dim o As Object
Dim m As MethodInfo
pi = GetType(System.Web.HttpRuntime).GetProperty("FileChangesMonitor", BindingFlags.NonPublic Or BindingFlags.Public Or BindingFlags.Static)
o = pi.GetValue(Nothing, Nothing)
m = o.GetType().GetMethod("Stop", BindingFlags.Instance Or BindingFlags.NonPublic)
m.Invoke(o, New Object() {})

似乎也有一個熱修復程序,似乎可以禁用注冊表項的“功能”:

http://support.microsoft.com/kb/911272

不能完全確定這是否適用於垃圾箱。

簡單的答案是,您不能。 如果IIS在二進制文件之一中檢測到更改,則必須重新加載以確保它使用的二進制文件正確。

真正的問題是:a)IIS是否真正檢測到更改,或者是由於“波動”導致OS認為內存中沒有文件? b)如果“波動”是問題的根源,是什么原因造成的? 如何解決?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM