<!--站點(diǎn)全球化設(shè)置,requestEncoding: 它用來檢查每一個(gè)發(fā)來請(qǐng)求的編碼.responseEncoding: 用于檢查發(fā)回 的響應(yīng)內(nèi)容編碼.fileEncoding:用于檢查aspx,asax等文件解析的默認(rèn)編碼,默認(rèn)的編碼是utf-8--> <globalization requestEncoding="gb2312" responseEncoding="gb2312" fileEncoding="gb2312" /> <!--會(huì)話狀態(tài)設(shè)置。mode: 分為off,Inproc,StateServer,SqlServer幾種狀態(tài) mode = InProc 存儲(chǔ)在進(jìn)程中 特點(diǎn):具有最佳的性能,速度最快,但不能跨多臺(tái)服務(wù)器存儲(chǔ)共享.mode = "StateServer" 存儲(chǔ)在狀態(tài)服務(wù)器中特點(diǎn):當(dāng) 需要跨服務(wù)器維護(hù)用戶會(huì)話信息時(shí),使用此方法。但是信息存儲(chǔ)在狀態(tài)服務(wù)器上,一旦狀態(tài)服務(wù)器出現(xiàn)故障,信息將丟失. mode="SqlServer" 存儲(chǔ)在sql server中特點(diǎn):工作負(fù)載會(huì)變大,但信息不會(huì)丟失 stateConnectionString :指定asp.net應(yīng)用程序存儲(chǔ)遠(yuǎn)程會(huì)話狀態(tài)的服務(wù)器名,默認(rèn)為本機(jī)。sqlConnectionStri ng:當(dāng)用會(huì)話狀態(tài)數(shù)據(jù)庫時(shí),在這里設(shè)置連接字符串。Cookieless:設(shè)置為flase時(shí),表示使用cookie會(huì)話狀態(tài)來標(biāo)識(shí)客戶 .timeout表示會(huì)話超時(shí)時(shí)間。--> <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionS tring="da sionState> <!--為 ASP.NET 應(yīng)用程序配置頁的視圖狀態(tài)設(shè)置。設(shè)置要存儲(chǔ)在頁歷史記錄中的項(xiàng)數(shù)。--> <sessionPageState historySize="9"/> <!--配置asp.net http運(yùn)行庫的設(shè)置??梢栽谟?jì)算機(jī),站點(diǎn),應(yīng)用程序和子目錄級(jí)別聲明 允許最多的請(qǐng)求個(gè)數(shù)100,最長(zhǎng)允許執(zhí)行請(qǐng)求時(shí)間為80秒,控制用戶上傳文件的大小,默認(rèn)是4M。useFullyQualifie dRedirectUrl客戶端重定向不需要被自動(dòng)轉(zhuǎn)換為完全限定格式。--> <httpRuntime appRequestQueueLimit="100" executionTimeout="80" maxRequestLength="4 0960" useFullyQualifiedRedirectUrl="false"/> <!--httpModules在一個(gè)應(yīng)用程序內(nèi)配置 HTTP 模塊。--> <httpModules> <add name="OutputCache" type="System.Web.Caching.OutputCacheModule" /> <add name="Session" type="System.Web.SessionState.SessionStateModule" /> <add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationM odule" /> <add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" /> <add name="PassportAuthentication" type="System.Web.Security.PassportAuthenticationMo dule" /> <add name="RoleManager" type="System.Web.Security.RoleManagerModule" /> <add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule" /> <add name="FileAuthorization" type="System.Web.Security.FileAuthorizationModule" /> <add name="AnonymousIdentification" type="System.Web.Security.AnonymousIdentificatio nModule" /> <!--自定義的URL重寫,type基本上就是dll名--> <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.U rlRewriter" /> <add name="Pro </httpModules> <!--httpHandlers用于根據(jù)用戶請(qǐng)求的URL和HTTP謂詞將用戶的請(qǐng)求交給相應(yīng)的處理程序。可以在配置級(jí)別的任何 層次配置此節(jié)點(diǎn),也就是說可以針對(duì)某個(gè)特定目錄下指定的特殊文件進(jìn)行特殊處理。 add:指定映射到處理程序的謂詞/路徑。clear:移除當(dāng)前已配置或已繼承的所有處理程序映射。remove:移除映射到 處理程序的謂詞/路徑。remove 指令必須與前一個(gè) add 指令的謂詞/路徑組合完全匹配。該指令不支持通配符。--> <httpHandlers> <remove verb="*" path="*.asmx"/> <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandl erFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3 856ad364e35"/> <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services. ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKey Token=31bf3856ad364e35"/> <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResou rceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31 bf3856ad364e35" validate="false"/> <add verb="POST,GET" path="ajaxpro/*.ashx" type="AjaxPro.AjaxHandlerFactory, AjaxPro.2"/> </httpHandlers> <!--為 Web 應(yīng)用程序使用的 Cookie 配置屬性。domain:設(shè)置 Cookie 域名。httpOnlyCookies:在 Interne t Explorer 6 SP1 中啟用 HttpOnlyCookies Cookie 的輸出。默認(rèn)值為 false。requireSSL:獲取一個(gè)指示是否需 要安全套接字層 (SSL) 通信的值.--> <httpCookies httpOnlyCookies="false" requireSSL="false"/> <!--控制 ASP.NET Web 服務(wù)及其客戶端的行為。protocols:指定傳輸協(xié)議,ASP.NET 可使用這些傳輸協(xié)議來解 密 HTTP--> <webServices> <protocols> <add/> </protocols> </webServices> <!--為 Web 應(yīng)用程序配置緩存設(shè)置。cache:定義全局應(yīng)用程序緩存設(shè)置。outputCache :指定應(yīng)用程序范圍的輸 出緩存設(shè)置。outputCacheSettings:指定可以應(yīng)用于應(yīng)用程序中頁的輸出緩存設(shè)置。 sqlCacheDependency:為 AS P.NET 應(yīng)用程序配置 SQL 緩存依賴項(xiàng)。--> <caching> <cache disableMemoryCollection = "false" disableExpiration = "false" privateBytesLimit = "0" percentagePhysicalMemoryUsedLimit = "90" privateBytesPollTime = "00:02:00"/> <!--設(shè)計(jì)需要以這種方式緩存的頁時(shí),您需要向該頁添加以下指令:<%@ OutputCache CacheProfile="Ser verOnly" %>--> <outputCacheSettings> <outputCacheProfiles> <add name="ServerOnly" duration="60" varyByCustom="browser" location="Server" /> </outputCacheProfiles> </outputCacheSettings> </caching> </system.web> </location> <!--網(wǎng)絡(luò)設(shè)置,authenticationModules:指定用于對(duì) Internet 請(qǐng)求進(jìn)行身份驗(yàn)證的模塊。connectionManage ment:指定與 Internet 宿主的連接的最大數(shù)目。defaultProxy:配置超文本傳輸協(xié)議 (HTTP) 代理服務(wù)器。 mailSettings:配置簡(jiǎn)單郵件傳輸協(xié)議 (SMTP) 郵件發(fā)送選項(xiàng)。requestCaching:控制網(wǎng)絡(luò)請(qǐng)求的緩存機(jī)制。setti ngs:配置 System.Net 的基本網(wǎng)絡(luò)選項(xiàng)。--> <system.net> <!--配置SMTP電子郵件設(shè)置--> <mailSettings> <smtp from="weipeng"> <network host="Gao" password="" userName="" /> </smtp> </mailSettings> |
|