|
|
Asp.net中如何配置Web.config呢?以下列舉詳細說明:
<?xml version="1.0" standalone="yes"?> <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <!--配置全局變量--> <appSettings> <add key="examstr" value="server=.;database=myweb_exam_db;uid=exam_login;pwd=xxd_examadmin"/> </appSettings> <!--配置全局變量--> <!--網(wǎng)站系統(tǒng)配置--> <system.web> <!--上傳文件時提示訪問被拒絕,生成圖片文件等失敗文件夾沒有改寫權(quán)限--> <identity impersonate="true"/> <!--在客戶端顯示錯誤信息--> <customErrors mode="Off" /> <!--允許匿名訪問--> <authorization> <allow users="*" /> </authorization> <!--啟用跟蹤頁面--> <trace enabled="true" requestLimit="1000" pageOutput="true" traceMode="SortByTime" localOnly="true" /> <!--防止網(wǎng)頁亂碼--> <globalization requestEncoding="gb2312" responseEncoding="gb2312" culture="zh-CN" fileEncoding="gb2312"/> <!--有兩個form時,用窗體提交時配置--> <pages validateRequest="false" enableSessionState="true" enableViewState="true" enableEventValidation="false"/> <!--設(shè)置上傳文件大小--> <httpRuntime executionTimeout="300" maxRequestLength="102400" useFullyQualifiedRedirectUrl="false"/> <!-- Sessionid更新--> <sessionState mode="InProc" cookieless="false" regenerateExpiredSessionId="true" timeout="1" /> </system.web> <!--網(wǎng)站系統(tǒng)配置--> </configuration>
|
|
|