asp.net 写系统日志
在注册表 System->CurrentControlSet->Services->Eventlog 处选择添加系统中 AspNet 这个账户注意是在右键的 安全->权限->添加
写日志
public static void Log(string sourceName, string message)
{
EventLog eventLog = null;
if (!(EventLog.SourceExists(sourceName)))
{
EventLog.CreateEventSource(sourceName, sourceName + "Log");
}
if (eventLog == null)
{
eventLog = new EventLog(sourceName + "Log");
eventLog.Source = sourceName;
}
eventLog.WriteEntry(message, System.Diagnostics.EventLogEntryType.Information);
}
sourceName 为日志名
相关文档:
Here is the full list of all events that occur in an ASP.NET application, from the standard modules, to the page, master page, page controls and master page controls.
I have not included the IIS 7 specific events (Log, for example).
What
When
HttpApplication.BeginRequest
HttpApplication.Auth ......
介绍
CKEditor是新一代的FCKeditor,是一个重新开发的版本。CKEditor是全球最优秀的网页在线文字编辑器之一,因其惊人的性能与可扩展性而广泛的被运用于各大网站。而CKFinder是一个功能强大的ajax文件管理器。其简单的用户界面使得各类用户,不管是从高级专业人才,还是互联网初学者,都够直观、快速学习的学习使用它。
& ......
对于大量的数据,有时候导出到Excel中将更加方便进行数据统计分析,而对于排版打印则导出到World文档中更加方便。在ASP.NET可以通过少量代码实现这两种导出。
新建一页面,该页面布局Html源码如下:
<form id="form1" runat="server"><div> ......
在Asp.net中Session的存储方式不象asp那样单一,一共提供了三种存储方式,由于最近一个2000多人使用的web软件出现了故障,用户每
天早上在某一时刻出现难以登陆现象,接着Session丢值出现,只有重启IIS,或机器.这时程序恢复正常了.整天都不会出现同样的问题
,但是第二天依旧!这种现象持续了好几天,我检查了一下日志文件 ......