web.config 文件的配置

时间:2022-06-22 01:36:46
web.config (根目录下)
<configuration>
  <appSettings>
    <add key="constring"
      value="Server=localhost;UID=sa;PWD=001219;Database=AspNetJobs" />
  </appSettings>
  <system.web>
  < authentication mode="Forms" >
  <forms name=".ASPNETJOBS"
    loginUrl="/aspnetjobs/site/password/login.aspx" />
  </authentication>
  </system.web>
</configuration>

web.config (其余目录比如密码目录)
<configuration>
  <system.web>
  < authorization >
    <deny users="?" />
  </authorization>
  </system.web>
</configuration>