C#跟踪异常? [英] C# Tracing Exception?

查看:81
本文介绍了C#跟踪异常?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用asp.net和c#开发了一个网站。

我使用visual studio发布了该网站。

我将该发布的网站发给了我的客户(超过100)。

我的客户在他们自己的网站上配置它。

我使用try catch和写日志文件处理异常(c:\Log\Log。 txt)具有唯一的id和日期时间。我的问题是我的客户端发生任何异常,解决我需要log.txt文件的问题。但我必须等到他们提供log.txt文件。



那么,有没有办法使用任何代码或任何工具读取该异常?(现在我因客户目前正在运行来源而无法修改我的来源。)



例如:我在浏览器中提供客户的URL并执行一些操作。现在我需要一个工具或代码应该在我访问该网站时跟踪异常

I have developed a website using asp.net and c#.
I published that website using visual studio.
I gave that published website to my customers( more than 100).
My customers configured it in their own website.
I have handled exceptions using try catch and write log file in (c:\Log\Log.txt) with unique id and datetime. My problem is whenever any exception occurs for my clients, to solve the issue i need that log.txt file. But i have to wait till they provide log.txt file.

So , is there any way to read that exception using any code or any tool?.(now i cant modify my source because of customers currently running it).

For example: i give customer's URL in browser and performing some operations.Now i need a tool or code that should trace exceptions while i am accessing that website

推荐答案

假设您无法修改现有代码,那么一个解决方案可能是开发一个小型Windows应用程序/服务,将其发送给每个客户端,每隔一段时间会自动通过电子邮件发送给您log.txt文件。但是,您第一次必须指导您的客户如何安装该应用程序/服务。如果是服务,您可以将其设置为自动启动,而在应用程序时,客户端必须输入调度程序任务。
Assuming you can't modify the existing code, then one solution could be to develop a small windows application/service, send it to each client, which will automatically email you that log.txt file at some time interval. But first time you have to guide your clients how to install that application/service. In case of service you can set it as auto-start, while in case of application, client have to put in scheduler tasks.


这篇关于C#跟踪异常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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