我的WCF服务具有安全审核的配置设置:
<serviceSecurityAudit auditLogLocation="Default"
suppressAuditFailure="false"
ServiceAuthorizationAuditLevel="SuccessOrFailure"
messageAuthenticationAuditLevel="SuccessOrFailure"/>
使用ASP.Net Dev Server在本地为此服务调用方法时,会导致此错误:
<ExceptionDetail xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<HelpLink i:nil="true"/>
<InnerException i:nil="true"/>
<Message>The process does not possess the 'SeAuditPrivilege' privilege which is required for this operation.</Message>
<StackTrace>at System.IdentityModel.Privilege.EnableTokenPrivilege(SafeCloseHandle threadToken)
...
我在本地计算机上安装了Windows7。
有人可以指导可能出现的问题吗?
谢谢!
答案 0 :(得分:2)
摆脱&#39; SeAuditPrivilege&#39;错误,我不得不改变
auditLogLocation="Default"
到
auditLogLocation="Application"
我有Windows7,由于某种原因,它无法写入&#34;安全日志&#34;这是Windows 7的默认设置,因为来自MS的此链接建议 - http://msdn.microsoft.com/en-us/library/system.servicemodel.auditloglocation%28v=vs.110%29.aspx
Default
Specifies the default location, which is determined by the operating system.
If writing to the Security log is supported (such as on Windows Vista and Windows
Server 2003 and later platforms), the default log location is the Security log.
Otherwise (such as in Windows XP SP2), the default log location is the Application log.
我必须更改&#34;默认&#34;的值。到#34;应用程序&#34;使它工作。
HTH。