今年夏天

随便写写,我的网络生活.

  DonewsBlog  |  Donews首页  |  Donews社区  |  Donews邮箱  |  我的首页  |  联系作者  |  聚合   |  登录
  249篇文章 :: 3篇收藏:: 239篇评论:: 28个Trackbacks

公告

[收藏]365Key|和讯网摘|博采|VIVI|狐摘

Bloglines订阅 Newsgator订阅 My Msn订阅 My Yahoo订阅 Rojo订阅 gougou订阅 周博通订阅 博阅订阅 Rsshow订阅 Google Reader

文章

收藏

相册

技术

相关参考

友情链接

存档


正在读取评论……


2004年12月


原文

        Windows 2003 Server R2
  Biztalk 2004 64
  Commerce Server 2002 64
  Windows XP x64
  Windows Server 2003 x64
  SQL 2000 Service Pack 4
  Virtual Server 2005 Service Pack 1
  Windows Server 2003 Service Pack 1
  Encarta 2006
  Money 2006
  Longhorn Beta (client)
  Longhorn Server Beta 1
  Exchange 2003 Service Pack 2 (includes some elements of Edge Services like Sender ID)
  Monthly IMF updates for Exchange 2003
  MSN Messenger 7
  MSN Search web
  MSN Search desktop
  Corperate Error Reporting 3.0
  Automated Deployment Services 2.0
  ISA 2004 Service Pack 1
  Office 12 Beta
  Small Business Server 2003 Service Pack 1
  Windows Update Services (SUS 2.0)
  Sharepoint Portal Server 2005
  ISA 2004 Enterprise Edition
  Microsoft Data Protection Server (DPS)
  Windows PE 2005
  Windows 2000 Security Rollup Pack 2
  ADAM 2.0
  System Center 2005 (SMS 2003 sp1, MOM 2005, SQL reporting)
  Visual Studio 2005
  Visual Studio 2005 express editions (C#, VB, ...)
  Visual Studio 2005 Team System
  SQL Server 2005
  SQL Server 2005 Express Edition
  AntiVirus and AntiSpyware 2005
  Windows Server 2003 Compute Cluster Edition
  Hot Patch Technology Support (part of common engineering initiative)
  .NET Framework 2.0
  Commerce Server 2006 beta
  ASP.net 2.0
  Network Access Protection (NAP)
  Windows Update (support for more MS products)
  "Instanbul" Windows Messenger (Voip client for LCS 2005)
  Xbox 2 US release ?
  Fingeprint reader in Intellimouse Explorer
  Windows Mobile 2005 (3G [UMTS] , Wifi, VGA)
  ActiveSync 4.0
  Live Meeting 2005
  Office for Small Business Management
  Office 2003 SP2




MSDN原文 ASP.NET Performance Monitoring, and When to Alert Administrators 下载源代码

Monitoring Performance Counters
Monitoring the Event Log
Monitoring the W3C and HTTPERR Logs
Other Resources Used to Monitor ASP.NET
Understanding the Performance Counters
   .NET CLR Exceptions Counter
   .NET CLR Loading Counters
   .NET CLR Memory Counters
   ASP.NET Counters
   ASP.NET Applications Counters
   Process Counters
   Processor Counter
   Memory Counter
   System Counter
   Web Service Counters
Conclusion

主要讨论的是如何使用ASP.NET的性能计数器。主要包括以下几个方面

  • Processor(_Total)\% Processor Time
  • Process(aspnet_wp)\% Processor Time
  • Process(aspnet_wp)\Private Bytes
  • Process(aspnet_wp)\Virtual Bytes
  • Process(aspnet_wp)\Handle Count
  • Microsoft® .NET CLR Exceptions\# Exceps thrown / sec
  • ASP.NET\Application Restarts
  • ASP.NET\Requests Rejected
  • ASP.NET\Worker Process Restarts (not applicable to IIS 6.0)
  • Memory\Available Mbytes
  • Web Service\Current Connections
  • Web Service\ISAPI Extension Requests/sec

如何在Application_Error事件中监视出错信息。

void Application_Error(Object sender, EventArgs ea) {
    StringBuilder message = new StringBuilder();
   
    if (Request != null) {
        message.AppendFormat(uriFormat, Request.Path);
    }
 
    if (Server != null) {
        Exception e;
        for (e = Server.GetLastError(); e != null; e = e.InnerException) {
            message.AppendFormat(exceptionFormat,
                                 e.GetType().Name,
                                 e.Message,
                                 e.StackTrace);
        }
    }

    if (!EventLog.SourceExists(sourceName)) {
        EventLog.CreateEventSource(sourceName, logName);
    }

    EventLog Log = new EventLog(logName, serverName, sourceName);
    Log.WriteEntry(message.ToString(), EventLogEntryType.Error);

    //Server.ClearError(); // uncomment this to cancel the error
}


.NET CLR Exceptions Counter  当运行Response.Redirect() Server.Transfer() Response.End() 会抛出ThreadAbortException错误,如果不想抛出错误,Response.Redirect(url,false)。

Application Restarts 以下为可能引发Application Restart 的情况

  • Modification of machine.config, web.config, or global.asax.
  • Modification of the application's bin directory or its contents.
  • When the number of compilations (ASPX, ASCX, or ASAX) exceeds the limit specified by <compilation numRecompilesBeforeAppRestart=/>.
  • Modification of the physical path of a virtual directory.
  • Modification of the code-access security policy.
  • The Web service is restarted.




如何在.NET中汇出Excel或者CSV文件,基本上比较经济的做法不是使用Excel工具,而是使用.NET的Response的ContentType属性来设置实现。

例一,通过XML和XSL进行汇出

例二,通过将DataSet转换为文本进行汇出

导入CSV文件,用ADO.NET的OleDB Provider .

   StringBuilder sDBCon = new StringBuilder("Provider=Microsoft.Jet.OLEDB.4.0;");
   sDBCon.Append("Data Source=");
   sDBCon.Append(sFileDirectory); //这里设置为上传文件所在的目录
   sDBCon.Append(";Extended Properties=Text;"); //处理的是文本类型

   String sSelect = "select * from  "+ sFileName;  //表明被文件名所代替
   try
   {   
    OleDbDataAdapter da = new OleDbDataAdapter(sSelect,sDBCon.ToString());
    _dsTrans = new DataSet();
    da.TableMappings.Add("Table", "ExcelTest");
    da.Fill(_dsTrans);
   }
   catch
   {
    this.MessageBox("读取您上传的文件的时候发生了错误,请确认您上传的文件是否正确。");
    return;
   }




嵌入HTML的代码的参数设置中增加“窗口模式”为 “透明”:  <param name="wmode" value="transparent">

设置后,不论原来的flash影片的背景如何,在网页中它的背景都不会显示,而是透明色,这样就可以产生看到影片后面的其他 HTML元素的效果。