web.configファイルの詳細
8779 ワード
( ).Web.Config XML ,
1.
: , <configSections> 。
2.
: <appSetting> 。 .
3.
: <system.Web> , Asp.net .
4.
: <sectionGroup> , , <configSections> <sectionGroup> .
( ).
1.<configuration>
, .
2.<appSetting>
。 ,
:
I.
<appSettings>
<add key="Conntction" value="server=192.168.85.66;userid=sa;password=;database=Info;"/>
<appSettings>
, , .
II.<appSettings>
<add key="ErrPage" value="Error.aspx"/>
<appSettings>
.
3.<compilation>
:
<compilation
defaultLanguage="c#"
debug="true"
/>
I.default language: , C# VB.net .
IIdebug : true , aspx ; false aspx ,
。 true, false.
4.<customErrors>
:
<customErrors
mode="RemoteOnly"
defaultRedirect="error.aspx"
<error statusCode="440" redirect="err440page.aspx"/>
<error statusCode="500" redirect="err500Page.aspx"/>
/>
I.mode : On,Off,RemoteOnly 3 。On ; Off asp.net ; RemoteOnly Web .
II.defaultRedirect: URL .
III.statusCode: , .
IV. redirect: URL.
5.<globalization>
:
<globalization
requestEncoding="utf-8"
responseEncoding="utf-8"
fileEncoding="utf-8"
/>
I.requestEncoding: .
II.responseEncoding: .
III.fileEncoding: aspx,asax .
6.<sessionState>
:
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>
I.mode: off,Inproc,StateServer,SqlServer
: http://blog.csdn.net/chengking/archive/2005/10/27/518079.aspx
II. stateConnectionString : Asp.net ,
III.sqlConnectionString: ,
IV. Cookieless: true , cookie ; , .
V. TimeOut: , , .
7.<authentication>
:
<authentication mode="Forms">
<forms name=".ASPXUSERDEMO" loginUrl="Login.aspx" protection="All" timeout="30"/>
</authentication>
<authorization>
<deny users="?"/>
</authorization>
I.Windows: IIS
II.Forms:
III.Passport: Passport cookie
IV.None:
Forms :
I.Name: Http cookie .
II.LoginUrl: URL, ,
III.Protection: cookie .
: All None Encryption Validation
a. All ,
b. None Cookie.
c. Encryption Cookie
d. validation Cookie
IV. TimeOut: Cookie . .