所以我遇到了正确传递给webservice映射的数据的问题。我试图从.net C#应用程序中捕获XML,因为它传递给Web服务。我尝试在web.config中使用Fiddler和system.diagnostics,但我只在system.diagnostics创建的文件中得到结果。我通过localhost,通过VPN(代理服务器)运行到webservice。下面是web.config中的代码以及它返回的内容。获得此返回数据的任何帮助都会很棒。
代码:
<system.diagnostics>
<trace autoflush="true">
</trace>
<sharedListeners>
<add name="console"
type="System.Diagnostics.ConsoleTraceListener" traceOutputOptions="DateTime" />
<add name="file"
type="System.Diagnostics.TextWriterTraceListener" initializeData="testrequest.log"
traceOutputOptions="DateTime, Callstack" />
</sharedListeners>
<sources>
<source name="LowLevelDesign" switchValue="Verbose">
<listeners>
<add name="file" />
</listeners>
</source>
<source name="System.Net.Http" switchValue="Verbose">
<listeners>
<add name="file" />
</listeners>
</source>
<source name="System.Net.HttpListener" switchValue="Verbose">
<listeners>
<add name="file" />
</listeners>
</source>
<source name="System.Net" switchValue="Verbose">
<listeners>
<add name="file" />
</listeners>
</source>
<source name="System.Net.Sockets" switchValue="Verbose">
<listeners>
<add name="file" />
</listeners>
</source>
</sources>
</system.diagnostics>
生成文件的结果。
System.Net Information: 0 : [5720] Current OS installation type is 'Client'.
DateTime=2015-06-26T03:22:58.3265794Z
Callstack= at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at System.Diagnostics.TraceEventCache.get_Callstack()
at System.Diagnostics.TraceListener.WriteFooter(TraceEventCache eventCache)
at System.Diagnostics.TraceListener.TraceEvent(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String message)
at System.Diagnostics.TraceSource.TraceEvent(TraceEventType eventType, Int32 id, String message)
at System.Net.Logging.PrintLine(TraceSource traceSource, TraceEventType eventType, Int32 id, String msg)
at System.Net.Logging.PrintInfo(TraceSource traceSource, String msg)
at System.Net.ComNetOS..cctor()
at System.Net.ServicePointManager..cctor()
at System.Net.ServicePointManager.set_InternalConnectionLimit(Int32 value)
at System.Net.ServicePointManager.set_DefaultConnectionLimit(Int32 value)
at System.Web.HttpRuntime.SetAutoConfigLimits(ProcessModelSection pmConfig)
at System.Web.HttpRuntime.SetThreadPoolLimits()
at System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException)
at System.Web.HttpRuntime.InitializeHostingFeatures(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException)
at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel)