这里删除不常用的,只留下节点
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<configSections>
</configSections>
<appSettings>
<add key="identifier" value="63B362AB3FE9FA8DEEB2C1E3889274A30" />
</appSettings>
<!--连接数据库字符串-->
<connectionStrings>
<add name="LocalSqlServer" connectionString="Server=.;database=XXX;uid=xx;pwd=xxxxxxxxxxxxx;" />
</connectionStrings>
<microsoft.web>
<converters>
</converters>
<webServices enableBrowserAccess="true"/>
<profileService enabled="true" setProperties="bulletin" getProperties="bulletin" />
</microsoft.web>
<system.web>
<!--<anonymousIdentification enabled="true"/>-->
<!-- 这里为profile信息 -->
<profile >
<properties>
<add name="xxxx" defaultValue="暂无消息"/>
</properties>
</profile>
<!-- 以下为WebParts的配置 -->
<webParts>
<personalization >
<providers>
<add connectionStringName="LocalSqlServer" applicationName="/" name="AspNetSqlProvider" type="System.Web.UI.WebControls.WebParts.SqlPersonalizationProvider"/>
</providers>
<authorization>
<!--<allow roles="user" verbs="enterSharedScope"/>--><!--Share模式开启,不开启时可开户User模式-->
<deny roles="anonymous" verbs="modifyState"/>
<allow roles="aa,bb" verbs="modifyState"/>
</authorization>
</personalization>
</webParts>
<!-- 以下为MemberShip的配置-->
<membership defaultProvider="AspNetSqlProvider">
<providers>
<add connectionStringName="LocalSqlServer" applicationName="/" description="something about Membership" requiresUniqueEmail="false" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" enablePasswordRetrieval="false" enablePasswordReset="true" passwordFormat="Hashed" name="AspNetSqlProvider" type="System.Web.Security.SqlMembershipProvider"/>
</providers>
</membership>
<pages theme="Silver"><!-- 页面主题设置-->
<controls>
</controls>
</pages>
<compilation debug="true"><!--发布时设成false -->
<buildProviders>
</buildProviders>
<assemblies>
</assemblies>
</compilation>
<httpHandlers>
</httpHandlers>
<httpModules>
</httpModules>
<!-- 验证模式-->
<authentication mode="Forms">
<forms name="xxx.xxx.net/com" loginUrl="Login.aspx/default.aspx"></forms>
</authentication>
<!--配置网页出错信息与出错显示页面 -->
<customErrors mode="RemoteOnly" defaultRedirect="ErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm"/><!-- 可自己添加错误信息与错误页面-->
<error statusCode="404" redirect="FileNotFound.htm"/>
</customErrors>
</system.web>
<!-- 以下节点作用一个页面的访问权限,可写多个,也可去掉第一句话,在一个文件夹放webconfig对整个文件夹起作用 -->
<!--
<location path="xxx.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
-->
</configuration>
版权声明:本文原创发表于 博客园,作者为 路过秋天 本文欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则视为侵权。 |
个人微信公众号![]() |
Donation(扫码支持作者):支付宝:![]() |
Donation(扫码支持作者):微信:![]() |
![]() |
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· PostgreSQL 和 SQL Server 在统计信息维护中的关键差异
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· DeepSeek “源神”启动!「GitHub 热点速览」
· 我与微信审核的“相爱相杀”看个人小程序副业
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库
· 上周热点回顾(2.17-2.23)