你好世界记录问题2 [英] Hello World Logging Problem 2

查看:70
本文介绍了你好世界记录问题2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我正在研究这个非常简单但有用的教程.

Well, I was working on this very simple yet useful tutorial.

http://wcf. netfx3.com/content/BuildingHelloWorld.aspx

我在发布loggin之前就发布了一个问题.

and I posted a problem before that I couldn't get the loggin working.

追随Madhu的Enble追踪建议也解决了这个问题

Followinig Madhu's suggetion to enble tracing also solved the problem

但是,当我创建另一个时,它不再起作用.当我制作大约5或6个样本时,

However, when I created another one, it didn't work again. When I make about 5, or 6 samples,

我在服务配置编辑器中具有相同的设置,但是很少有程序创建e2e文件.

I have the same setting in the service config editor, but the very few programs create e2e file.

所以我将发布app.config文件,你们可以看看它,并给我建议.

So I'll post the app.config file and you guys can take a look at it and give me suggetions please.

我想知道是否也必须指定客户,但这对我没有意义.

I was wondering if I have to specify the client too but that doesn't make sence to me.

无论如何,这是我的app.config文件

Anyhow, here's my app.config file

<?xml version ="1.0" encoding ="utf-8" < source><配置>< system.diagnostics>< sources>< source name =" System.ServiceModel" switchValue =详细的,ActivityTracing"



< ="add type =" System.Diagnostics.DefaultTraceListener"name =默认">
<过滤器类型=" />
</add>
<添加名称="ServiceModel侦听器">
<过滤器类型=" />
</add>
</listeners>
</source>
<源名称="System.ServiceModel.MessageLogging" switchValue =详细的,ActivityTracing"<监听器>
<添加类型="System.Diagnostics.DefaultTraceListener" name =默认">
<过滤器类型=" />
</add>
<添加名称="MessageLogging侦听器">
<过滤器类型=" />
</add>
</listeners>
</source>
</sources>
< sharedListeners>
< add initializeData = "C:\ Users \ hkawano \ Desktop \ My own Samples \ basic self host Logging \ Service \ Netfx3HelloService \ Trace.e2e"
type ="System.Diagnostics.XmlWriterTraceListener,系统,版本= 2.0.0.0,区域性=中立,PublicKeyToken = b77a5c561934e089"
名称="ServiceModel Listener" traceOutputOptions ="LogicalOperationStack,DateTime,Timestamp,ProcessId,ThreadId,Callstack","<过滤器类型=", />
</add>
<添加initializeData ="C:\ Users \ hkawano \ Desktop \我自己的Samples \ basic self host Logging \ Service \ Netfx3HelloService \ Messeges.e2e"
类型="System.Diagnostics.XmlWriterTraceListener,系统,版本= 2.0.0.0,文化=中性,PublicKeyToken = b77a5c561934e089",名称="MessageLogging Listener". traceOutputOptions ="LogicalOperationStack,DateTime,Timestamp,ProcessId,ThreadId,Callstack","<过滤器类型=", />
</add>
</sharedListeners>
</system.diagnostics>
< system.serviceModel>
messageLogging logEntireMessage =" true" logMessagesAtTransportLevel ="true"; />
</diagnostics>
<服务>
<服务名="Netfx3HelloService.SCHelloService"; >
端点
address =" http://localhost/hello "
" binding ="basicHttpBinding"
contract ="Netfx3HelloService.SCHelloService" />
</service>
</services>
</system.serviceModel>
</configuration>

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
 <system.diagnostics>
  <sources>
   <source name="System.ServiceModel" switchValue="Verbose, ActivityTracing"
    propagateActivity="true">
    <listeners>
     <add type="System.Diagnostics.DefaultTraceListener" name="Default">
      <filter type="" />
     </add>
     <add name="ServiceModel Listener">
      <filter type="" />
     </add>
    </listeners>
   </source>
   <source name="System.ServiceModel.MessageLogging" switchValue="Verbose, ActivityTracing">
    <listeners>
     <add type="System.Diagnostics.DefaultTraceListener" name="Default">
      <filter type="" />
     </add>
     <add name="MessageLogging Listener">
      <filter type="" />
     </add>
    </listeners>
   </source>
  </sources>
  <sharedListeners>
   <add initializeData="C:\Users\hkawano\Desktop\My own Samples\basic self host Logging\Service\Netfx3HelloService\Trace.e2e"
    type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
    name="ServiceModel Listener" traceOutputOptions="LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack">
    <filter type="" />
   </add>
   <add initializeData="C:\Users\hkawano\Desktop\My own Samples\basic self host Logging\Service\Netfx3HelloService\Messeges.e2e"
    type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
    name="MessageLogging Listener" traceOutputOptions="LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack">
    <filter type="" />
   </add>
  </sharedListeners>
 </system.diagnostics>
 <system.serviceModel>
  <diagnostics>
   <messageLogging logEntireMessage="true" logMessagesAtTransportLevel="true" />
  </diagnostics>
  <services>
   <service name="Netfx3HelloService.SCHelloService" >
    <endpoint
       address="http://localhost/hello"
       binding="basicHttpBinding"
       contract="Netfx3HelloService.SCHelloService" />
   </service>
  </services>
 </system.serviceModel>
</configuration>

在本教程中,名称空间"Netfx3HelloService"是"HelloService"

In the tutorial, namespace "Netfx3HelloService" was "HelloService"

合同名称"SCHelloService";也是"HelloService"所以我改了名字,以便找出哪个是哪个.

contract name "SCHelloService" was also "HelloService" so I replaced the name so that I can figure out which is which.

无论如何,谢谢您的帮助.另外,我不知道是否可以使用Filemon,因为我使用的是Vista.

Anyhow, thanks for your help. Also, I don't know if I can use Filemon cause I'm using Vista.

推荐答案

标记为已死.


这篇关于你好世界记录问题2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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