新聞中心
ASP.NET管道優(yōu)化

在沙雅等地區(qū),都構(gòu)建了全面的區(qū)域性戰(zhàn)略布局,加強發(fā)展的系統(tǒng)性、市場前瞻性、產(chǎn)品創(chuàng)新能力,以專注、極致的服務(wù)理念,為客戶提供網(wǎng)站設(shè)計、成都做網(wǎng)站 網(wǎng)站設(shè)計制作定制開發(fā),公司網(wǎng)站建設(shè),企業(yè)網(wǎng)站建設(shè),品牌網(wǎng)站建設(shè),全網(wǎng)營銷推廣,外貿(mào)營銷網(wǎng)站建設(shè),沙雅網(wǎng)站建設(shè)費用合理。
位于請求管道中的很多ASP.NET默認的HttpModules用于攔截客戶端所發(fā)出的每個請求。例如,SessionStateModule攔截每個請求,并解析對應(yīng)的會話cookie,然后在HttpContext中加載適當?shù)臅?。實時證明,并不是所有的modules都是必要的。
例如,如果你不使用Membership和Profile provider提供程序,那么你就可以不需要FormsAuthentication module。如果你需要為你的用戶使用Windows驗證,那么你就可以不需要WindowsAuthentication。位于管道中的這些 modules僅僅在每次請求到來時執(zhí)行一些不必要的代碼。
默認的modules都定義在了machine.config文件中(位于$WINDOWS$\Microsoft.NET\Framework\$VERSION$\CONFIG目錄下)。
name="OutputCache" type="System.Web.Caching.OutputCacheModule" /> name="Session" type="System.Web.SessionState.SessionStateModule" /> name="WindowsAuthentication" - type="System.Web.Security.WindowsAuthenticationModule" />
name="FormsAuthentication" - type="System.Web.Security.FormsAuthenticationModule" />
name="PassportAuthentication" - type="System.Web.Security.PassportAuthenticationModule" />
name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule" /> name="FileAuthorization" type="System.Web.Security.FileAuthorizationModule" /> name="ErrorHandlerModule" type="System.Web.Mobile.ErrorHandlerModule, - System.Web.Mobile, Version=1.0.5000.0,
- Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
你可以通過在站點的web.config文件中添加
name="Session" /> name="WindowsAuthentication" /> name="PassportAuthentication" /> name="AnonymousIdentification" /> name="UrlAuthorization" /> name="FileAuthorization" />
上面的配置對于使用了數(shù)據(jù)庫并基于Forms驗證的網(wǎng)站來說非常適合,它們并不需要任何會話的支持。因此,所有這些modules都可以安全的刪除。以上介紹ASP.NET管道優(yōu)化
網(wǎng)站題目:淺談ASP.NET管道優(yōu)化
網(wǎng)頁URL:http://m.fisionsoft.com.cn/article/dpdjjdd.html


咨詢
建站咨詢
