跟踪 Visual Studio 生成的 Web 服务代理发出的请求内容

发布于 2024-07-23 06:55:51 字数 102 浏览 8 评论 0原文

我有一个由 Visual Studio 中的“添加 Web 引用”功能构建的 Web 引用代理,需要跟踪/查看它发布到远程 Web 服务器的实际内容。 有人可以告诉我该怎么做吗? 谢谢!

I have a web reference proxy built up by the "Add Web Reference" feature in Visual Studio and need to trace/see the actual content it's posting to the remote web server. Can someone please tell me how I can do? Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

百合的盛世恋 2024-07-30 06:55:51

要跟踪 Web 服务请求和响应详细信息,您可以在 web.config 中添加以下配置。

<!-- Tracing Request/Response -->

<system.diagnostics>
    <trace autoflush="true" />
    <sources>
        <source name="System.Web.Services.Asmx">
            <listeners>
                <add name="AsmxTraceFile" type="System.Diagnostics.TextWriterTraceListener" initializeData="REQ_RES.log" />
                <!--traceOutputOptions="LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId"-->
            </listeners>
        </source>
    </sources>
    <switches>
        <add name="System.Web.Services.Asmx" value="Verbose" />
    </switches>
</system.diagnostics>


<!-- Tracing Request/Response -->

通过添加此内容,对于每个请求和响应,日志将在您的根文件夹中创建,名称为“REQ_RES.log”

To trace web service request and response details you can add the below configuration in web.config.

<!-- Tracing Request/Response -->

<system.diagnostics>
    <trace autoflush="true" />
    <sources>
        <source name="System.Web.Services.Asmx">
            <listeners>
                <add name="AsmxTraceFile" type="System.Diagnostics.TextWriterTraceListener" initializeData="REQ_RES.log" />
                <!--traceOutputOptions="LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId"-->
            </listeners>
        </source>
    </sources>
    <switches>
        <add name="System.Web.Services.Asmx" value="Verbose" />
    </switches>
</system.diagnostics>


<!-- Tracing Request/Response -->

by adding this, for every request and response the log will be created in your root folder with the name of 'REQ_RES.log'

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文