locked
wcf service - access denied exception RRS feed

  • Question

  • hi,

    I am facing the below issue when connecting to my wcf service. I checked all the settings/configuration and haven't identified anything significant causing this issue.

    Can anyone please help in resolving this issue. This was taken from the wcf  Trace log.

    <E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent"><System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system"><EventID>131076</EventID><Type>3</Type><SubType Name="Warning">0</SubType><Level>4</Level><TimeCreated SystemTime="2014-03-04T06:44:23.8546212Z" /><Source Name="System.ServiceModel" /><Correlation ActivityID="{85ed15e4-1d18-4bf8-a9a2-3a8be6943a68}" /><Execution ProcessName="w3wp" ProcessID="4900" ThreadID="1" /><Channel /><Computer>TA-PC</Computer></System><ApplicationData><TraceData><DataItem><TraceRecord Severity="Warning" Channel="Analytic" xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord"><TraceIdentifier>http://msdn.microsoft.com/en-US/library/System.ServiceModel.Diagnostics.TraceHandledException.aspx</TraceIdentifier><Description>Handling an exception. Exception details: System.Security.SecurityException: The source was not found, but some or all event logs could not be searched.  To create the source, you need permission to read all event logs to make sure that the new source name is unique.  Inaccessible logs: Security.
       at System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly, Boolean wantToCreate)
       at System.Diagnostics.EventLog.SourceExists(String source, String machineName, Boolean wantToCreate)
       at System.Diagnostics.EventLogInternal.VerifyAndCreateSource(String sourceName, String currentMachineName)
       at System.Diagnostics.EventLogInternal.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
       at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type)
       at RemoteDevice.Logger.EventLogLogger.Exception(Exception ex, String trace)
       at RemoteDevice.Logger.Log.Exception(Exception ex, String trace)
       at RemoteDevice.ManagementService.ManagementService.GetRuleInfo(String ruleType) in D:\20131011_AutomatedTestFramework\ManagementService\RemoteDevice.ManagementService\RemoteDevice.ManagementService\ManagementService.svc.cs:line 258
       at RemoteDevice.ManagementService.ManagementService.GetTerminalServerRules() in D:\20131011_AutomatedTestFramework\ManagementService\RemoteDevice.ManagementService\RemoteDevice.ManagementService\ManagementService.svc.cs:line 126
       at SyncInvokeGetTerminalServerRules(Object , Object[] , Object[] )
       at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp; outputs)
    The Zone of the assembly that failed was:
    MyComputer</Description><AppDomain>/LM/W3SVC/1/ROOT/ManagementService-1-130383890160488868</AppDomain><Exception><ExceptionType>System.Security.SecurityException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>The source was not found, but some or all event logs could not be searched.  To create the source, you need permission to read all event logs to make sure that the new source name is unique.  Inaccessible logs: Security.</Message><StackTrace>   at System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly, Boolean wantToCreate)
       at System.Diagnostics.EventLog.SourceExists(String source, String machineName, Boolean wantToCreate)
       at System.Diagnostics.EventLogInternal.VerifyAndCreateSource(String sourceName, String currentMachineName)
       at System.Diagnostics.EventLogInternal.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
       at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type)
       at RemoteDevice.Logger.EventLogLogger.Exception(Exception ex, String trace)
       at RemoteDevice.Logger.Log.Exception(Exception ex, String trace)
       at RemoteDevice.ManagementService.ManagementService.GetRuleInfo(String ruleType) in D:\20131011_AutomatedTestFramework\ManagementService\RemoteDevice.ManagementService\RemoteDevice.ManagementService\ManagementService.svc.cs:line 258
       at RemoteDevice.ManagementService.ManagementService.GetTerminalServerRules() in D:\20131011_AutomatedTestFramework\ManagementService\RemoteDevice.ManagementService\RemoteDevice.ManagementService\ManagementService.svc.cs:line 126
       at SyncInvokeGetTerminalServerRules(Object , Object[] , Object[] )
       at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp;amp; outputs)</StackTrace><ExceptionString>System.Security.SecurityException: The source was not found, but some or all event logs could not be searched.  To create the source, you need permission to read all event logs to make sure that the new source name is unique.  Inaccessible logs: Security.
       at System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly, Boolean wantToCreate)
       at System.Diagnostics.EventLog.SourceExists(String source, String machineName, Boolean wantToCreate)
       at System.Diagnostics.EventLogInternal.VerifyAndCreateSource(String sourceName, String currentMachineName)
       at System.Diagnostics.EventLogInternal.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
       at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type)
       at RemoteDevice.Logger.EventLogLogger.Exception(Exception ex, String trace)
       at RemoteDevice.Logger.Log.Exception(Exception ex, String trace)
       at RemoteDevice.ManagementService.ManagementService.GetRuleInfo(String ruleType) in D:\20131011_AutomatedTestFramework\ManagementService\RemoteDevice.ManagementService\RemoteDevice.ManagementService\ManagementService.svc.cs:line 258
       at RemoteDevice.ManagementService.ManagementService.GetTerminalServerRules() in D:\20131011_AutomatedTestFramework\ManagementService\RemoteDevice.ManagementService\RemoteDevice.ManagementService\ManagementService.svc.cs:line 126
       at SyncInvokeGetTerminalServerRules(Object , Object[] , Object[] )
       at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp;amp; outputs)
    The Zone of the assembly that failed was:
    MyComputer</ExceptionString></Exception></TraceRecord></DataItem></TraceData></ApplicationData></E2ETraceEvent>

    Tuesday, March 4, 2014 11:53 AM

Answers

  • Hi,

    >>The source was not found, but some or all event logs could not be searched.  To create the source, you need permission to read all event logs to make sure that the new source name is unique.  Inaccessible logs: Security.

    Many days ago, I meet the same error with you, but when open the visual studio and then Run as Administrator. Then it works. It seesm that it is something wrong with the permission. So please try to check it.

    Also please try to check these articles:

    http://gmori.blogspot.com/2012/05/source-was-not-found-but-some-or-all.html .http://www.sandypondconsulting.com/how-to-fix-windows-service-problems.aspx .

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, March 5, 2014 8:02 AM