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 为日志名
相关文档:
Cascading drop down lists is a really nice feature for web developers. I thought it was time to write an article on how to do this using ASP.NET and jQuery. Well here’s one way of doing it. Before we get started, this example uses the latest version of jQuery which is 1.3.2.&n ......
仿petshop的一个数据访问层的类 乘风现有原创程序乘风广告联盟系统乘风多用户计数器 乘风多用户PHP统计系统 乘风电影程序乘风网址程序乘风广告管理系统乘风asp.net探针仿petshop的一个数据访问层的类 using System;
using System.Data;
using System.Data.OleDb;
using System.Configuration;
namespace yueying.Compon ......
众所周知,WEB上的打印是比较困难的,常见的WEB上打印的方法大概有三种:
1、直接利用IE的打印功能。一般来说,这种方法可以做些扩展,而不是单单的调用javascript:print()这样简单,比如,可以使用如下代码:
<OBJECT
id=WebBrowser classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 width=0>
</ ......
在asp.net 1.1中, 二级域名Forms验证模式下共享登陆状态的方法请参考下面文章:
http://www.cnblogs.com/caomao/archive/2005/07/05/186606.html
而在asp.net 2.0中实现方法更为简单,只需修改web.config文件即可,修改方法如下:
<authentication mode="Forms">
<forms name ......