web.config

来自「功能超强大的选课系统」· CONFIG 代码 · 共 70 行

CONFIG
70
字号
<?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 xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
	<appSettings>
		<add key="StudentManagerDb" value="StudentManager.SQLServer"/>
		<!--<add key="StudentManagerDb" value="StudentManager.Oracle"/>-->
	</appSettings>
	<connectionStrings>
		<remove name="sqlconnstr"/>
		<add name="sqlconnstr" connectionString="Data Source=.\SqlExpress;Initial Catalog=StudentManager;uid=sa;pwd=sa;" providerName="System.Data.SqlClient"/>
    <add name="LocalSqlServer" connectionString="data source=.\SqlExpress;Integrated Security=SSPI;Initial Catalog=StudentManager" providerName="System.Data.SqlClient" />
  </connectionStrings>
	<system.web>
		<!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        -->
		<compilation debug="true">
			<assemblies>
				<add assembly="System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></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=".ASPAUTH" loginUrl="Login.aspx" defaultUrl="Login.aspx" protection="All" timeout="20" requireSSL="false"/>
		</authentication>
		<authorization>
			<deny users="?"/>
		</authorization>
		<roleManager enabled="true"></roleManager>
		<!--
            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="Off" defaultRedirect="GenericErrorPage.htm">
			<error statusCode="403" redirect="NoAccess.htm"/>
			<error statusCode="404" redirect="FileNotFound.htm"/>
		</customErrors>
	</system.web>
	<location path="~/Guest">
		<system.web>
			<authorization>
				<allow roles="Guest"/>
				<deny users="*"/>
			</authorization>
		</system.web>
	</location>
	<location path="~/Department/Css">
		<system.web>
			<authorization>				
				<allow users="?"/>
			</authorization>
		</system.web>
	</location>
</configuration>

⌨️ 快捷键说明

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