摘要: Instances of the HttpApplication class are created in the ASP.NET infrastructure, not by the user directly. One instance of the HttpApplication class is used to process many requests in its lifetime; ... 阅读全文
posted @ 2008-04-03 09:58 玉开 阅读(1024) 评论(0) 推荐(0) 编辑
摘要: deployment配置节在system.web下面只能在机器级别进行配置。 若retail的属性配置为true,则将不会输出调试,跟踪信息,customError的mode属性也将采纳remoteOnly属性值,并且在web.config中修改是无效的。 如果某个页面需要调试,服务器的machine.config中的deployment的retail属性又设置为true,这时候可以在页面的@pa... 阅读全文
posted @ 2008-03-27 09:32 玉开 阅读(468) 评论(0) 推荐(0) 编辑
摘要: 在网站更新时将App_Offline.htm文件放在网站的根目录,这样在网站得到动态web请求时便会将此文件的内容输出到客户端。 需要注意的是由于ie浏览器不接受小于512字节的状态号不是200的服务器响应,所以该文件的大小不能小于512个字节。 阅读全文
posted @ 2008-03-21 12:27 玉开 阅读(325) 评论(0) 推荐(0) 编辑
摘要: 心里有气,改天在写具体情况。 阅读全文
posted @ 2008-01-14 11:38 玉开 阅读(1393) 评论(3) 推荐(0) 编辑
摘要: SEO要求重定向必须是301永久重定向,实现如下: protected override void OnLoad(EventArgs e){ Response.Clear(); Response.Status = "301 Moved Permanently"; Response.AddHeader("Location","http://travel.hexun.com");} 阅读全文
posted @ 2007-12-27 17:04 玉开 阅读(1073) 评论(4) 推荐(0) 编辑
摘要: 推荐一篇文章,.net3.0新特性 http://www.codeproject.com/KB/cs/csharp3.aspx 阅读全文
posted @ 2007-12-21 09:56 玉开 阅读(733) 评论(0) 推荐(0) 编辑
摘要: public void SendFax(string DocumentName,string FileName, string RecipientName, string FaxNumber){if (FaxNumber != ""){try{FAXCOMLib.FaxServer faxServer = new FAXCOMLib.FaxServerClass();faxServer.Conne... 阅读全文
posted @ 2007-12-20 15:42 玉开 阅读(2584) 评论(11) 推荐(1) 编辑
摘要: 在默认情况下.net的验证控件会在客户端进行验证,正因为如此,导致我们在按钮事件中很容易忽略了在服务器端调用Page.IsValid。 阅读全文
posted @ 2007-11-21 17:10 玉开 阅读(771) 评论(0) 推荐(0) 编辑
摘要: 有时打开资源管理器后常发现N个w3wp进程,有时某个进程占用了过高的内存,以前不得不挨个回收应用程序池来观察是哪个应用程序池对应哪个w3wp进程,最近在网上发现一篇文章,介绍一方法,可以查到w3wp对应的池子。 1、在任务管理器中增加显示pid字段。就可以看到占用内存或者cpu最高的进程pid 2、在命令提示符下运行iisapp -a。注意,第一次运行,会提示没有js支持,点击确定。然后再次... 阅读全文
posted @ 2007-11-01 09:23 玉开 阅读(1224) 评论(0) 推荐(0) 编辑
摘要: Stack Trace: [FileNotFoundException: Could not load file or assembly 'App_Web_csf6r1ov, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the ... 阅读全文
posted @ 2007-10-11 09:43 玉开 阅读(5536) 评论(2) 推荐(1) 编辑