web.config

来自「一个土地管理系统」· CONFIG 代码 · 共 82 行

CONFIG
82
字号
<?xml version="1.0"?>
<!-- 
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
    \Windows\Microsoft.Net\Framework\v2.x\Config 
-->
<configuration>
	<appSettings>
    <add key="LoginName" value="sa" />
    <add key="ServerIP" value="." />
    <add key="LoginPass" value="123"/>
    <add key="DBName" value ="LandSystem" />
	</appSettings>
	<connectionStrings>
		<remove name="LocalSqlServer"/>
		<add name="LocalSqlServer" connectionString="Data Source=localhost;Initial Catalog=LandSystem;UID=sa;PWD=123" providerName="System.Data.SqlClient"/>
	</connectionStrings>
	<system.web>
		<membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="15">
			<providers>
				<clear/>
				<add name="SqlProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="LocalSqlServer" applicationName="/" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordFormat="Hashed"/>
			</providers>
		</membership>
		<!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        -->
		<roleManager enabled="true"/>
		<compilation debug="true">
			<assemblies>
				<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
				<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>
		</compilation>
		<!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
		<authentication mode="Forms">
			<forms name=".ASPXUSERDEMO" loginUrl="Login.aspx" defaultUrl="Redirect.aspx" protection="All" timeout="60"/>
		</authentication>
		<!--
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
		<authorization>
			<allow users="*"/>
		</authorization>
		
	</system.web>
	<location path="manage">
		<system.web>
			<authorization>
				<allow roles="Administrators"/>
				<deny users="*"/>
			</authorization>
		</system.web>
	</location>
	<location path="user">
		<system.web>
			<authorization>
				<allow roles="Users"/>
				<deny users="*"/>
			</authorization>
		</system.web>
	</location>
</configuration>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?