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配置文件解析
64 1
|
9月前
|
JSON Java Go
SpringBoot 配置文件:什么是配置文件?配置文件能干什么?
SpringBoot 配置文件:什么是配置文件?配置文件能干什么?
|
XML Java 数据格式
springmvc使用配置文件
springmvc使用配置文件
95 0
|
XML Java API
怎样使用Spring的配置文件?带大家一起玩转Spring配置文件(一)
怎样使用Spring的配置文件?带大家一起玩转Spring配置文件(一)
怎样使用Spring的配置文件?带大家一起玩转Spring配置文件(一)
|
XML Java 数据格式
怎样使用Spring的配置文件?带大家一起玩转Spring配置文件(三)
怎样使用Spring的配置文件?带大家一起玩转Spring配置文件(三)
怎样使用Spring的配置文件?带大家一起玩转Spring配置文件(三)
|
XML Java 数据格式
怎样使用Spring的配置文件?带大家一起玩转Spring配置文件(二)
怎样使用Spring的配置文件?带大家一起玩转Spring配置文件(二)
怎样使用Spring的配置文件?带大家一起玩转Spring配置文件(二)
|
Java 测试技术 Spring
Spring配置文件详解
Spring配置文件详解
291 0
Spring配置文件详解
|
XML Java 数据格式
|
Dubbo Java 应用服务中间件
tomcat启动时没有把spring配置文件定义的bean加载进来
tomcat启动时没有把spring配置文件定义的bean加载进来 最近在把自己的之前搭建的那个通用的ssh框架,配置成dubbo+zookeeper这样的分布式架构。
1637 0
|
Java 数据库连接 网络架构
SpringMVC加载配置Properties文件的几种方式
SpringMVC加载配置Properties文件的几种方式 最近开发的项目使用了SpringMVC的框架,用下来感觉SpringMVC的代码实现的非常优雅,功能也非常强大, 网上介绍Controller参数绑定、URL映射的文章都很多了,写这篇博客主要总结一下SpringMVC加载配置Properties文件的几种方式 1.
3440 0