1、布署ApplicationErrorLog未处理异常处理组件。
A、引用相关组件。
B、修改Web.config
2008年4月小记<?xml version="1.0"?>
2008年4月小记
<configuration>
2008年4月小记    
<configSections>
2008年4月小记        
<section name="ApplicationErrorLogData" type="Lion.Web.ApplicationErrorLog.Configuration.SqlDataProviderConfigurationRuntimeData, Lion.Web.ApplicationErrorLog, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
2008年4月小记        
<section name="ApplicationErrorLogMail" type="Lion.Web.ApplicationErrorLog.Configuration.MailDataProviderConfigurationRuntimeData, Lion.Web.ApplicationErrorLog, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
2008年4月小记    
</configSections>
2008年4月小记    
<ApplicationErrorLogData Type="Lion.Web.ApplicationErrorLog.SqlErrorLog, Lion.Web.ApplicationErrorLog, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" PageSize="17" RssPageSize="20" URLParamsUsePathInfo="false" NotLogHttpExceptionCode=""/>
2008年4月小记    
<ApplicationErrorLogMail Smtp="" SmtpPort="" LoginName="" LoginPassWord="" FromEmail="" FromName="" ToName="" ToEmail="" CC="test1@xxx.net;test2@xxx.net" AsynchronouslySendMail="false" MailCharset="utf-8"/>
2008年4月小记    
<system.web>
2008年4月小记        
<httpHandlers>
2008年4月小记            
<add verb="POST,GET,HEAD" path="ErrorLog.aspx" type="Lion.Web.ApplicationErrorLog.ErrorLogPageFactory,  Lion.Web.ApplicationErrorLog, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
2008年4月小记        
</httpHandlers>
2008年4月小记        
<httpModules>
2008年4月小记            
<add name="ErrorLog" type="Lion.Web.ApplicationErrorLog.ErrorLogModule, Lion.Web.ApplicationErrorLog, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
2008年4月小记        
</httpModules>
2008年4月小记    
</system.web>
2008年4月小记    
<system.codedom>
2008年4月小记    
<system.webServer>
2008年4月小记        
<modules>
2008年4月小记            
<add name="ErrorLog" type="Lion.Web.ApplicationErrorLog.ErrorLogModule, Lion.Web.ApplicationErrorLog, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
2008年4月小记        
</modules>
2008年4月小记        
<handlers>
2008年4月小记            
<add name="ErrorLog"  verb="POST,GET,HEAD" path="ErrorLog.aspx" type="Lion.Web.ApplicationErrorLog.ErrorLogPageFactory,  Lion.Web.ApplicationErrorLog, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
2008年4月小记        
</handlers>
2008年4月小记    
</system.webServer>
2008年4月小记
</configuration>


注意:
     <add verb="POST,GET,HEAD"
       path="[查看异常列表所指定的路径文件名]"
       type="Lion.Web.ApplicationErrorLog.ErrorLogPageFactory, Lion.Web.ApplicationErrorLog, Version=1.0.2004.1027, Culture=neutral, PublicKeyToken=ee91461c95f67bb1" />
       查看异常列表所指定的路径文件名/clear 清空错误信息
       查看异常列表所指定的路径文件名/install 初始化安装数据库
       查看异常列表所指定的路径文件名/rss 获取以rss格式展现的错误信息列表
       查看异常列表所指定的路径文件名?Domain=www.lionsky.net 获取所有在www.lionsky.net域名下发生的错误信息列表
       />
     注意:当URLParamsUsePathInfo属性为false时,以上命令请使用?Command=[clear|install|rss]

/ApplicationErrorLog.aspx?Command=install 安装日志数据库
/ApplicationErrorLog.aspx?Command=clear 清空错误信息

2、
Master页面传值。
A、定义接口IMasterData
    }
B、Master页面实现该接口
2008年4月小记public partial class MPCommon : System.Web.UI.MasterPage, IMasterData
}
C、封装方法
2008年4月小记    public static class PageHelper
    }
这样可以支持两层Master的嵌套。
D、使用方法。
2008年4月小记    string CurrentUserName;
2008年4月小记    
protected void Page_Load(object sender, EventArgs e)
    }

3、解决"无法使用前导..在顶级目录上退出"
修改web.config
2008年4月小记        <authentication mode="Forms">
2008年4月小记            
<forms cookieless="UseCookies"></forms>
2008年4月小记        
</authentication>
http://community.studyez.com/blogs/silentacorn/archive/2006/10/20/23194.aspx
http://www.cnblogs.com/hjf1223/archive/2006/10/14/529227.html
http://todotnet.com/archive/2006/07/01/7472.aspx

4、TimeSpan的字符串表达,及如何设置WCF的毫秒级超时
可以按“[-]d.hh:mm:ss.ff”格式将 TimeSpan 表示为一个字符串,其中“-”是用于表示负 TimeSpan 值的可选符号,“d”部分为天,“hh”为小时,“mm”为分钟,“ss”为秒,而“ff”为秒的小数部分。例如,初始化为 1.0e+13 刻度的 TimeSpan 表示“11.13:46:40”,即 11 天,13 小时,46 分钟和 40 秒。
http://hi.baidu.com/heiru/blog/item/2e4cd42abfcea42dd52af12a.html
所以500毫秒的超时可以这样设置 sendTimeout="00:00:00.5"
2008年4月小记                <binding name="IBlogContractBinding" sendTimeout="00:00:00.5" maxReceivedMessageSize="500000000">
2008年4月小记                    
<security mode="None"/>
2008年4月小记                    
<readerQuotas maxDepth="32"
2008年4月小记                                  maxStringContentLength
="500000000"
2008年4月小记                                  maxArrayLength
="16384"
2008年4月小记                                  maxBytesPerRead
="4096"
2008年4月小记                                  maxNameTableCharCount
="16384" />
2008年4月小记                
</binding>



相关文章: