WebConfig常用配置文件说明

简介:

这里删除不常用的,只留下节点

<?xml version="1.0"?>

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

  <configSections>
  </configSections>
  <appSettings>
    <add key="identifier" value="63B362AB3FE9FA8DEEB2C1E3889274A30" />
  </appSettings>

  <!--连接数据库字符串-->
  <connectionStrings>
    <add name="LocalSqlServer" connectionString="Server=.;database=XXX;uid=xx;pwd=xxxxxxxxxxxxx;" />
  </connectionStrings>
  <microsoft.web>
    <converters>
     </converters>
    <webServices enableBrowserAccess="true"/>
    <profileService enabled="true" setProperties="bulletin" getProperties="bulletin" />
  </microsoft.web>

  <system.web>
    <!--<anonymousIdentification enabled="true"/>-->
<!-- 这里为profile信息 -->
    <profile >
      <properties>
        <add name="xxxx" defaultValue="暂无消息"/>
        </properties>
    </profile>
    <!-- 以下为WebParts的配置 -->
    <webParts>
      <personalization >
        <providers>
          <add connectionStringName="LocalSqlServer" applicationName="/" name="AspNetSqlProvider" type="System.Web.UI.WebControls.WebParts.SqlPersonalizationProvider"/>
        </providers>
        <authorization>
<!--<allow roles="user" verbs="enterSharedScope"/>--><!--Share模式开启,不开启时可开户User模式-->
          <deny roles="anonymous" verbs="modifyState"/>
          <allow roles="aa,bb" verbs="modifyState"/>
        </authorization>
      </personalization>
    </webParts>
    <!-- 以下为MemberShip的配置-->
    <membership defaultProvider="AspNetSqlProvider">
      <providers>
        <add connectionStringName="LocalSqlServer" applicationName="/"  description="something about Membership" requiresUniqueEmail="false" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" enablePasswordRetrieval="false" enablePasswordReset="true" passwordFormat="Hashed" name="AspNetSqlProvider" type="System.Web.Security.SqlMembershipProvider"/>
      </providers>
    </membership>
    <pages theme="Silver"><!-- 页面主题设置-->
      <controls>
       </controls>
    </pages>

    <compilation debug="true"><!--发布时设成false -->
      <buildProviders>
       </buildProviders>
      <assemblies>
        </assemblies>
    </compilation>
        <httpHandlers>
        </httpHandlers>
    <httpModules>
     </httpModules>

  <!-- 验证模式-->
    <authentication mode="Forms">
      <forms name="xxx.xxx.net/com" loginUrl="Login.aspx/default.aspx"></forms>
    </authentication>
    <!--配置网页出错信息与出错显示页面   -->
    <customErrors mode="RemoteOnly" defaultRedirect="ErrorPage.htm">
      <error statusCode="403" redirect="NoAccess.htm"/><!-- 可自己添加错误信息与错误页面-->
      <error statusCode="404" redirect="FileNotFound.htm"/>
    </customErrors>

  </system.web>
  <!-- 以下节点作用一个页面的访问权限,可写多个,也可去掉第一句话,在一个文件夹放webconfig对整个文件夹起作用  -->
<!--
  <location path="xxx.aspx">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>    
  </location>
  -->
</configuration>

版权声明:本文原创发表于博客园,作者为路过秋天,原文链接:http://www.cnblogs.com/cyq1162/archive/2006/11/16/562690.html

目录
相关文章
|
6月前
|
存储 NoSQL Redis
Redis配置文件解析
Redis配置文件解析
60 1
|
4月前
|
前端开发 Java 微服务
SpringBoot中的配置文件加载顺序
SpringBoot中的配置文件加载顺序
45 0
|
8月前
常用配置
更改 File And Code Templates 选中 Includes 添加如下内容:
30 0
|
8月前
|
XML JSON 前端开发
springboot 的配置文件加载顺序
springboot 的配置文件加载顺序
|
Java Maven
Springboot为什么加载不上application.yml的配置文件
Springboot为什么加载不上application.yml的配置文件
Springboot为什么加载不上application.yml的配置文件
|
测试技术
180612-Spring之Yml配置文件加载问题
在resource目录下有一个application.yml文件,希望是通过@PropertySource注解,将配置文件数据读取到Environment中,然而调试发现数据始终读取不到,google之后,记录下解决方法
178 0
180612-Spring之Yml配置文件加载问题
|
JSON Java 数据格式
SpringBoot 配置文件加载顺序
SpringBoot 配置文件加载顺序
117 0
|
Java Spring 容器
springboot配置文件加载顺序
springboot配置文件加载顺序
|
Java 测试技术 Spring
Spring配置文件详解
Spring配置文件详解
291 0
Spring配置文件详解