通常新建ASP.NET时,我会先设置WEB.CONFIG
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<!--设置连接字符串-->
<appSettings>
<add key="ConnectString" value="..." />
</appSettings>
<system.web>
<!--设置允许HTML代码,XML代码等POSTBACK-->
<pages validateRequest="false" />
<!--设置TRACE生效,并输出页面999次,非本地访问也生效-->
<trace
enabled="true"
requestLimit="999"
pageOutput="true"
traceMode="SortByTime"
localOnly="false"
/>
<!--设置编码为中文的GB2312-->
<globalization
requestEncoding="gb2312"
responseEncoding="gb2312"
/>
</system.web>
</configuration>