在IIS上的C#中输出到控制台 [英] Outputting to the Console in C# on IIS

查看:352
本文介绍了在IIS上的C#中输出到控制台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试调试我们在IIS上运行的C#中的一些Web服务代码。我是新的Windows编程,不知道如何查看到控制台的输出。我们在代码中有一些写语句,但我不知道如何在这个东西运行时查看控制台。帮助?

We are trying to debug some web services code we're running in C# on IIS. I am new to Windows programming and have no idea how to view output to the console. We've got some write statements in the code, but I can't figure out how to view the console while this thing is running. Help?

推荐答案

您将需要查看ASP.NET跟踪

You'll want to take a look at ASP.NET tracing

这里是一个方便的链接,您可以开始: http:/ /www.asp101.com/articles/robert/tracing/default.asp

here is a handy link to get you started: http://www.asp101.com/articles/robert/tracing/default.asp

如果您在网络中放置以下内容,则可以启用应用程序范围跟踪。 config,那么你将有权访问你的trace.axd

you can enable application wide tracing if you place the following in your web.config, then you will have access to your trace.axd

<trace enabled="true" 
    localOnly="false" 
    pageOutput="false" 
    requestLimit="500" 
    traceMode="SortByTime"
/>

这篇关于在IIS上的C#中输出到控制台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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