如何在ASP.NET网站中记录错误和用户活动 [英] How to log errors and user activity in ASP.NET website

查看:79
本文介绍了如何在ASP.NET网站中记录错误和用户活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用c#开发了一个网站,工作正常。我只想记录我网站的所有活动和错误。我使用log4net时遇到困难,因为我必须登录Asp.net网站而不是Web应用程序,并且无法在我的网站中找到配置log4net所需的global.asax文件。



PS:我正在使用visual studio 2010.



我尝试过:



我尝试过以下活动记录和错误记录在ASP.NET [ ^ ]



但是此解决方案适用于网络应用,我需要网站解决方案。

I have developed a website in c#, its working fine. I just want to log all the activities and errors of my website. I am having difficulties to use log4net as I have to log Asp.net website not a web application and cant find the global.asax file in my website which is required to configure log4net.

P.S: I am using visual studio 2010.

What I have tried:

I have tried the following Activity Logging and Error Logging in ASP.NET[^]

But this solution is for web appliation and I need the solution for website.

推荐答案

一些流行的错误记录器是

Log4Net

[ ^ ]



Elmah

[ ^ ]
Some popular error loggers are
Log4Net
[^]

Elmah
[^]


这篇关于如何在ASP.NET网站中记录错误和用户活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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