asp.net 实用程序允许远程 writeline?
几年前,我有一个简单的实用程序,可以在本地计算机上运行,它可以监视服务器,而无需远程调试或在服务器上运行任何内容。
我可以将 Console.Writeline 的等效项添加到代码中(我不记得它是控制台、调试还是跟踪),并且可以通过在我的台式计算机上运行该实用程序来监视它。
我希望有人能指出我正确的方向。
I had a simple utility a couple years back that I could run on my local machine, and it would monitor a server without the need for remote debugging, or for anything to be running on the server.
I could add the equivalent of Console.Writeline to the code (I can't remember if it was console, debug, or trace) and could monitor it by running the utility on my desktop machine.
I'm hoping that someone can point me in the right direction.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以创建 WCF 或 Web 服务来检查您需要的内容并返回 XML 或 Json。
客户端将调用该服务
You can create WCF or Webservice that will check what you need and return you XML or Json.
And client will invoke this service
标准方法是在代码中使用 Trace.Write 方法并使用以下方式观察发生了什么
http://myserver/Trace.axd (它会告诉你在 web.config 中启用跟踪)
这允许你查看比字符串更多的数据 - 它显示完整的上下文,并且它实际上对所有跟踪进行计时,以便您可以看到不同操作花费了多少时间
the standard way is to use Trace.Write method in your code and watch what's going on by using
http://myserver/Trace.axd (it will tell you to enable tracing in web.config)
This allows you to see much more data than just your string - it shows complete context plus it actually times all the traces so you can see how much time different actions took