質問

SharePoint ULSログに、無関心なオブジェクトの8L1N警告が多く見つかりました。興味深いのは、スタックトレース全体が私のコードに何も表示しないことです。その場合、何を探すべきかわかりませんか?それにつながったそれはいくつかの構成エラーになることができますか?

この警告を回避するにはどうすればよいですか?

以下のULSログ:

An SPRequest object was not disposed before the end of this thread.  To avoid wasting system resources, dispose of this object or its parent (such as an SPSite or SPWeb) as soon as you are done using it.  This object will now be disposed.  Allocation Id: {DBFA1F95-40DF-4AB6-BE88-3AE39F7E4E1F}  This SPRequest was allocated at    at Microsoft.SharePoint.Library.SPRequest..ctor()     at Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous)     at Microsoft.SharePoint.SPWeb.InitializeSPRequest()     at Microsoft.SharePoint.SPWeb.EnsureSPRequest()     at Microsoft.SharePoint.SPWeb.get_Request()     at Microsoft.SharePoint.SPWeb.get_All...  
06/03/2009 10:21:05.10* w3wp.exe (0x170C)                       	0x10F8	Windows SharePoint Services   	General                       	8l1n	High    	...Properties()     at Microsoft.SharePoint.ApplicationPages.PermissionSetupPage.GetParentWebAssociatedGroups()     at Microsoft.SharePoint.ApplicationPages.PermissionSetupPage.OnLoad(EventArgs e)     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest()     at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)     at System.Web.UI.Page.ProcessRequest(HttpContext context)     at ASP._layouts_permsetup_aspx.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.H...
06/03/2009 10:21:05.10* w3wp.exe (0x170C)                       	0x10F8	Windows SharePoint Services   	General                       	8l1n	High    	...ttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)     at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(Exception error)     at System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)     at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)     at System.Web.HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)     at System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
役に立ちましたか?

解決

ええ、時にはマイクロソフトがそれ自身のベストプラクティスに従わないこともあります。ここで言及しました: Spsite OpenWebを使用して作成されたSPWEBの処分

あなたがそれについて本当にできることは何もありません。

他のヒント

コードを確認し、自分自身を作成するSPSite、SPWEB(およびその他)を適切に処分する必要があります(「new Spobject(url)」およびsites.openweb())。これらのオブジェクトには、自動的に廃棄されない管理されていないSprequestオブジェクトが含まれています。

このプロセスであなたを確立するには、使用する必要があります spdisposecheck (通常、コードを作成するときにSPDISPOSECHECKを自動的に実行するように設定します)。

あります 白書 MSDNでは、あなたが未来を助けることができます。すべてのspsiteオブジェクトとspwebオブジェクトを処分する必要はないことに注意してください。 spcontext.currentから取られたSpsiteとspwebは通常、処分されないでください。いつのときのさらなるガイダンスを得るために いいえ 処分するには、ロジャーラムズを参照してください 「ガイダンスを処分しないでください」。

注:上記の警告は、「Potentiallt過剰数のSprequestオブジェクト」と混同しないでください。ALSログで警告。この警告は、必ずしもあなたのオブジェクトが処分されていないことを示しているわけではありません。ただ、それらの多くを開いたことがあります(現在のウェブを通してループを行うときなど)。この警告は、TRESHOLDをより大きな値に設定することで緩和できます。

hkey_local_machine software microsoft shared tools web server extensions heapsettings

    LocalSPRequestWarnCount = 50

参考文献:

ベストプラクティス:使い捨てのWindows SharePoint Servicesオブジェクトの使用

SpdisposeCheckを使用して、SharePoint Dispose()コードレビューを自動化します

SharePoint 2007/2010「ガイダンスを処分しないで」 + spdisposecheck

WSS V3とMoss 2007のSPSITE/SPWEBリークのトラブルシューティング

SharePoint 2007およびWSS 3.0は、例別にパターンを処分します

HTH ANDERS RASK

ライセンス: CC-BY-SA帰属
所属していません sharepoint.stackexchange
scroll top