诊断跟踪记录在部署到IIS 7中不工作 [英] Diagnostic Trace Logging Not Working when Deployed to IIS 7

查看:111
本文介绍了诊断跟踪记录在部署到IIS 7中不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作从IIS 6站点迁移到IIS 7,我无法看到我所有的日志。我的System.Diagnostics程序配置如下:

I am working on migrating a site from IIS 6 to IIS 7 and I am not able to see all of my logs. My system.diagnostics configuration is as follows:

<system.diagnostics>
  <trace autoflush="true"></trace>
  <sources>
    <source name="Assembly1" switchValue="All">
      <listeners>
        <add name="DiagnosticMessageTraceListener"
             type="System.Diagnostics.TextWriterTraceListener"
             traceOutputOptions="ProcessId, ThreadId, DateTime"
             initializeData="E:\Inetpub\logs\App\Assembly1.log" />
      </listeners>
    </source>
    <source name="Assembly2" switchValue="All">
      <listeners>
        <add name="DiagnosticMessageTraceListener"
             type="System.Diagnostics.TextWriterTraceListener"
             traceOutputOptions="ProcessId, ThreadId, DateTime"
             initializeData="E:\Inetpub\logs\App\Assembly2.log" />
      </listeners>
    </source>
    <source name="Assebly3" switchValue="All">
      <listeners>
        <add name="DiagnosticMessageTraceListener"
             type="System.Diagnostics.TextWriterTraceListener"
             traceOutputOptions="ProcessId, ThreadId, DateTime"
             initializeData="E:\Inetpub\logs\App\Assembly3.log" />
      </listeners>
    </source>
    <source name="System.ServiceModel" switchValue="All" propagateActivity="true">
      <listeners>
        <add name="DiagnosticMessageTraceListener"
             type="System.Diagnostics.XmlWriterTraceListener"
             initializeData="E:\Inetpub\logs\App\ServiceTrace.svclog" />
      </listeners>
    </source>
    <source name="System.ServiceModel.MessageLogging" switchValue="All">
      <listeners>
        <add name="DiagnosticMessageTraceListener"
             type="System.Diagnostics.XmlWriterTraceListener"
             initializeData="E:\Inetpub\logs\App\ServiceMessages.svclog" />
      </listeners>
    </source>
  </sources>
  <switches>
    <add name="System.Net" value="Verbose" />
    <add name="System.Net.Sockets" value="Verbose" />
  </switches>
</system.diagnostics>

如果我在本地运行使用ASP.Net Web服务器或本地IIS我让我所有的日志文件的应用程序。一旦应用程序已被部署到IIS 7我只得到System.ServiceModel日志。我已经验证该目录是否存在,我已经给予了充分的控制给大家。我还企图强制日志刷新重新启动的服务和网站。我刚才一直在尝试任何事情来得到一个日志出了这种事,所以我还安装了跟踪与日志记录工具角色服务。我还是不明白我的应用程序日志。

If I run the application locally using the ASP.Net web server or local IIS I get all my log files. Once the application has been deployed to IIS 7 I only get the System.ServiceModel log. I have verified that the directory exists and I have given full control to everybody. I also have restarted the services and the site in an attempt to force the logs to flush. I have just been trying anything to get a log out of this thing so I also installed the Tracing and Logging Tools role services. I still don't get my application logs.

我也试过,我记录到事件日志,而不是跟踪日志文件的实现。这也表现出相同的行为。在部署到本地IIS,但不是在部署到实际的服务器工作在本地和。我记录到应用程序日志和我的IIS7的机器上我给完全控制权限到HKEY_LOCAL_MACHINE \\系统\\ CurrentControlSet \\服务\\事件日志\\应用。

I also tried an implementation where I logged to the EventLog instead of trace log files. This also exhibited the same behavior. Worked locally and when deployed to local IIS but not when deployed to the actual server. I logged to the application log and on my IIS7 machine I gave full control permission to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\Application.

好像我必须在这里失去了一些东西。我不能让这些2不同的日志记录实现的任何信息时,IIS 7中部署我甚至不知道什么是这里很常见。做EventLog.WriteEntry和Trace.TraceEvent都使用WCF?

Seems like I must be missing something here. I can't get any information out of these 2 different logging implementations when deployed within IIS 7. I'm not even sure what is common here. Do EventLog.WriteEntry and Trace.TraceEvent both use WCF?

推荐答案

让每个人都有第E的完全访问权限:\\的Inetpub \\日志\\ APP \\

Let Everyone has Full Access permissions on E:\Inetpub\logs\App\

关于其他的权限问题,学习上的用户帐户有关IIS 7的变化,

About other permission issues, learn about IIS 7 changes on user account,

的http:/ /learn.iis.net/page.aspx/110/changes-between-iis-60-and-iis-7-security/

这篇关于诊断跟踪记录在部署到IIS 7中不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆