4

一部の顧客サーバーで OData WCF サービスを実行しています。.Net 3.5 ではすべてが非常にうまく機能しましたが、ソリューションを .Net4 にアップグレードした後、WCF サービスはランダムな時間間隔 (通常は数日) の後、すべての要求に対して突然 404 を返し始めます。

Web サイトの残りの部分は正常に実行されています。404 は、Web サイトの再起動後に発生しているようです。

再び機能させるために、web.config に変更を加えました。HttpRuntime.UnloadAppDomain(); の呼び出し 問題を解決できません。

ローカルでエラーの再現を試みていますが、発生するまでに数日かかる場合があるため、再現が難しい問題です。

助言がありますか?

編集:

これは、サーバー イベント ログからのエラー メッセージです。

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
    <Provider Name="System.ServiceModel 4.0.0.0" />
    <EventID Qualifiers="49154">3</EventID>
    <Level>2</Level>
    <Task>5</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2012-06-02T11:15:32.000000000Z" />
    <EventRecordID>28236</EventRecordID>
    <Channel>Application</Channel>
    <Computer>xxxx-ST-001</Computer>
    <Security UserID="S-1-5-82-3945269471-185734930-3707521103-2442450153-1755958218" />
</System>
- <EventData>
    <Data>System.ServiceModel.Activation.HostedHttpRequestAsyncResult/65092316</Data>
    <Data>System.Web.HttpException (0x80004005): There was no channel actively listening at 'http://11.11.11.11/waf/services/OData.svc'. This is often caused by an incorrect address URI. Ensure that the address to which the message is sent matches an address on which a service is listening. ---> System.ServiceModel.EndpointNotFoundException: There was no channel actively listening at 'http://11.11.11.11/waf/Services/OData.svc'. This is often caused by an incorrect address URI. Ensure that the address to which the message is sent matches an address on which a service is listening. at System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result) at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest() at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest() at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)</Data>
    <Data>w3wp</Data>
    <Data>1852</Data>
</EventData>

2012 年 12 月 18 日の更新: 再起動後のサイトへの最初の要求が WCF OData サービスに対して行われるようにすることで、ローカルでエラーを再現することができます。エラーメッセージ:

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error: 

An unhandled exception was generated during the execution of the current web request.    Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[NullReferenceException: Object reference not set to an instance of an object.]
   System.Web.Compilation.DiskBuildResultCache.CacheBuildResult(String cacheKey,   BuildResult result, Int64 hashCode, DateTime utcStart) +9508708
   System.Web.Compilation.BuildManager.CacheBuildResultInternal(String cacheKey, BuildResult result, Int64 hashCode, DateTime utcStart) +70
   System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +9929866
   System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) +299
   System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) +103
   System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate) +82
   System.Web.Compilation.BuildManager.GetCompiledCustomString(String virtualPath) +29
   System.ServiceModel.HostingManager.GetCompiledCustomString(String normalizedVirtualPath) +164
   System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +206
   System.ServiceModel.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity) +52
   System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +598

[ServiceActivationException: The service '/ecoodata' cannot be activated due to an exception during compilation.  The exception message is: Object reference not set to an instance of an object..]
   System.Runtime.AsyncResult.End(IAsyncResult result) +495736
   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +178
   System.ServiceModel.Activation.ServiceHttpModule.EndProcessRequest(IAsyncResult ar) +348782
   System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +9663393

誰でもこれが何であるかの手がかりを得ましたか?

4

0 に答える 0