locked
Error logging to CacheClientLog.log RRS feed

  • Question

  • We seem to have recurring problems writing logging information to CacheClientLog.log. Has anyone else encountered this? It's not clear who is retaining a lock on this file, but it appears that some process is.

    Also, does anyone have any idea what the underlying error might be? Something related to WcfTransportChannel.ThrowIfNotCommunicationException?

    Here's the event in the event log:

    Event Type:   Error
    Event Source: ASP.NET 2.0.50727.0
    Event Category:      None
    Event ID:     1334
    Date:         23/07/2009
    Time:         00:23:46
    User:         N/A
    Computer:     x
    Description:
    An unhandled exception occurred and the process was terminated.
     
    Application ID: /LM/W3SVC/1/ROOT
     
    Process ID: 2924
     
    Exception: System.ServiceModel.Diagnostics.CallbackException
     
    Message: An AsyncCallback threw an exception.
     
    StackTrace:    at System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously)
       at System.ServiceModel.Channels.SynchronizedMessageSource.ReceiveAsyncResult.OnReceiveComplete(Object state)
       at System.ServiceModel.Channels.SessionConnectionReader.OnAsyncReadComplete(Object state)
       at System.ServiceModel.Channels.SocketConnection.FinishRead()
       at System.ServiceModel.Channels.SocketConnection.AsyncReadCallback(Boolean haveResult, Int32 error, Int32 bytesRead)
       at System.ServiceModel.Channels.OverlappedContext.CompleteCallback(UInt32 error, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
       at System.ServiceModel.Diagnostics.Utility.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
       at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
     
    InnerException: System.UnauthorizedAccessException
     
    Message: Access to the path 'c:\windows\system32\inetsrv\CacheClientLog.log' is denied.
     
    StackTrace:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
       at System.Data.Fabric.Common.FileEventSink.WriteEntry(String src, TraceEventType msgType, String msgText)
       at System.Data.Fabric.Common.SinkWrapper.WriteEntry(Int32 msgLevel, String src, TraceEventType msgType, String msgText, Object[] args)
       at System.Data.Fabric.Common.EventLogWriter.WriteWarning(String src, String format, Object[] args)
       at Microsoft.Data.Caching.WcfTransportChannel.LogException(Exception e)
       at Microsoft.Data.Caching.WcfTransportChannel.ThrowIfNotCommunicationException(Exception e)
       at Microsoft.Data.Caching.WcfClientChannel.CompleteProcessing(IAsyncResult result)
       at Microsoft.Data.Caching.WcfTransportChannel.Receive(IAsyncResult result)
       at System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously)
    Thursday, July 23, 2009 1:01 AM

Answers

  • Hi,
    It seems the client application does not have the permission to write the log into the system32 folder. Please change the folder name in the app.config to redirect the client log (CacheClientLog.log) into a different folder. See the example below.

    <

     

    fabric>
    <
    section name="logging" path="">
    <
    collection name="sinks" collectionType="list">
    <customType className="System.Data.Fabric.Common.EventLogger,FabricCommon" sinkName="System.Data.Fabric.Common.ConsoleSink,FabricCommon" sinkParam="" defaultLevel="-1"/>
    <
    customType className="System.Data.Fabric.Common.EventLogger,FabricCommon" sinkName="System.Data.Fabric.Common.FileEventSink,FabricCommon" sinkParam="E:\test\CacheClientLog" defaultLevel="3"/>
    <
    customType className="System.Data.Fabric.Common.EventLogger,FabricCommon" sinkName="Microsoft.Data.Caching.ETWSink, CacheBaseLibrary" sinkParam="" defaultLevel="-1" />
    </
    collection>
    </
    section>
    </
    fabric>


    Thanks
    Shankar

    Thursday, July 23, 2009 4:47 AM