web.config的配置

本文介绍了如何在服务器上配置Web.Config文件,包括连接字符串设置、编译调试配置、身份验证模式及自定义错误页面等关键部分。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<?xmlversion="1.0"?>
<!--
Note:Asanalternativetohandeditingthisfileyoucanusethe
webadmintooltoconfiguresettingsforyourapplication.Use
theWebsite->Asp.NetConfigurationoptioninVisualStudio.
Afulllistofsettingsandcommentscanbefoundin
machine.config.commentsusuallylocatedin
WindowsMicrosoft.NetFramework2.xConfig
-->
<configuration>
<appSettings/>
<connectionStrings>
<addname="dangweiConnectionString"connectionString="DataSource=192.168.0.200cs;
InitialCatalog=dangwei;uid=sa;pwd=404;"

providerName
="System.Data.SqlClient"/>
<addname="dangweiConnectionString2"connectionString="DataSource=192.168.0.200cs;
InitialCatalog=dangwei;uid=sa;pwd=404;"

providerName
="System.Data.SqlClient"/>
<addname="sqlconn"connectionString="server=192.168.0.200cs;database=dangwei;
uid=sa;pwd=404;"

providerName
="System.Data.SqlClient"/>
<addname="dangweiConnectionString3"connectionString="DataSource=192.168.0.200cs;
InitialCatalog=dangwei;uid=sa;pwd=404;"

providerName
="System.Data.SqlClient"/>
<addname="dangweiConnectionString4"connectionString="DataSource=192.168.0.200cs;
InitialCatalog=dangwei;uid=sa;pwd=404;"

providerName
="System.Data.SqlClient"/>
<addname="dangweiConnectionString5"connectionString="DataSource=192.168.0.200cs;
InitialCatalog=dangwei;uid=sa;pwd=404;"

providerName
="System.Data.SqlClient"/>
<addname="dangweiConnectionString6"connectionString="DataSource=192.168.0.200cs;
InitialCatalog=dangwei;uid=sa;pwd=404;"

providerName
="System.Data.SqlClient"/>
<addname="dangweiConnectionString7"connectionString="DataSource=192.168.0.200cs;
InitialCatalog=dangwei;uid=sa;pwd=404;"

providerName
="System.Data.SqlClient"/>
<addname="dangweiConnectionString8"connectionString="DataSource=192.168.0.200cs;
InitialCatalog=dangwei;uid=sa;pwd=404;"

providerName
="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<!--
Setcompilationdebug="true"toinsertdebugging
symbolsintothecompiledpage.Becausethis
affectsperformance,setthisvaluetotrueonly
duringdevelopment.
-->
<httpHandlers>
<addpath="Reserved.ReportViewerWebControl.axd"verb="*"
type
="Microsoft.Reporting.WebForms.HttpHandler,Microsoft.ReportViewer.WebForms,
Version=8.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"

validate
="false"/>
</httpHandlers>
<compilationdebug="true">
<buildProviders>
<addextension=".rdlc"type="Microsoft.Reporting.RdlBuildProvider,Microsoft.ReportViewer.
Common,Version=8.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
/>
</buildProviders>
</compilation>
<!--
The<authentication>sectionenablesconfiguration
ofthesecurityauthenticationmodeusedby
ASP.NETtoidentifyanincominguser.
-->
<authenticationmode="Forms">
<formsloginUrl="denglu.aspx"/>

<!--
The<customErrors>sectionenablesconfiguration
ofwhattodoif/whenanunhandlederroroccurs
duringtheexecutionofarequest.Specifically,
itenablesdeveloperstoconfigurehtmlerrorpages
tobedisplayedinplaceofaerrorstacktrace.

<customErrorsmode="RemoteOnly"defaultRedirect="GenericErrorPage.htm">
<errorstatusCode="403"redirect="NoAccess.htm"/>
<errorstatusCode="404"redirect="FileNotFound.htm"/>
</customErrors>
-->
</authentication>

</system.web>
<system.web>
<customErrorsmode="Off"/>
</system.web>
<locationpath="security">



<system.web>
<authorization>
<denyusers="?"/>
<denyusers="*"/>
</authorization>
</system.web>
</location>
</configuration>






终于把服务器上的web.config搞定啦,哈哈哈
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值