zoukankan      html  css  js  c++  java
  • web.config 配置

    <?xml version="1.0"?>

    <!--
    有关如何配置 ASP.NET 应用程序的详细信息,请访问
    http://go.microsoft.com/fwlink/?LinkId=169433
    -->

    <configuration>
    <connectionStrings>
    <add name="ApplicationServices"
    connectionString="data source=.SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
    providerName="System.Data.SqlClient" />
    </connectionStrings>

    <system.web>
    <compilation debug="true" targetFramework="4.0" />

    <authentication mode="Forms">
    <forms loginUrl="~/Account/Login.aspx" timeout="2880" /> <!--登录验证 timeout超时时间 -->

    </authentication>

    <membership defaultProvider="AspNetSqlMembershipProvider"> <!--关联到验证字段 -->

    <providers>
    <!--membership用户管理 -->
    <clear/>
    <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"
    enablePasswordRetrieval="true" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Clear"
    maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
    applicationName="/" />
    </providers> <!--关联到验证字段 --> <!--1)System.Web.Security.SqlMembershipProvider 系统类 -->
    <!-- 2)关联的数据库connectionStringName="ApplicationServices"-->
    </membership> <!-- 取回密码enablePasswordRetrieval="false"-->
    <!-- 重置密码 enablePasswordReset="true"-->
    <!-- 最短的密码长度 minRequiredPasswordLength="6"-->
    <!-- 最少非字母数字minRequiredNonalphanumericCharacters="0"-->
    <!-- 唯一的邮箱 requiresUniqueEmail="false" -->
    <!--passwordAttemptWindow="10"-->
    <!-- 密码提示问题 requiresQuestionAndAnswer="false"-->
    <!-- 密码输入次数maxInvalidPasswordAttempts="5"-->
    <!-- 程序名applicationName="/"-->




    <profile defaultProvider="AspNetSqlProfileProvider"> <!--购物车用到 序列化-->

    <providers>
    <clear/>
    <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
    </providers>

    <!--<properties> 添加一个购物车的
    <add />
    </properties>-->
    </profile>

    <roleManager enabled="false" defaultProvider="AspNetSqlRoleProvider"> <!--角色管理-->
    <providers>
    <clear/>
    <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
    <!--jiyuwindows验证的角色管理 <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />-->
    </providers>
    </roleManager>

    </system.web>

    <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
    </system.webServer>
    </configuration>
  • 相关阅读:
    mysql优化---订单查询优化(1):视图优化+索引创建
    docker系列(一):docker基础与安装笔记
    Linux进程管理
    scrapy-redis源码解读之发送POST请求
    anaconda虚拟环境管理,从此Python版本不用愁
    Ubuntu18.04安装mongodb
    Python开发之日志记录模块:logging
    Git学习笔记:基础篇
    python开发之虚拟环境管理:virtualenv、virtualenvwrapper、pycharm
    Python开发之序列化与反序列化:pickle、json模块使用详解
  • 原文地址:https://www.cnblogs.com/shuozi-love/p/3746707.html
Copyright © 2011-2022 走看看