All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
HTML语言剖析(十)链接标记_[Html教程]
用php把现有动态新闻页面改成静态页的方案_php资料_编程技术
visual c++中控件的概述
问答:查询分析器不能单步调试的的原因_[SQL Server教程]
ASP.NET中连接MYSQL_[Asp.Net教程]
模板用xml的思路_[PHP教程]
asp.net页面导出为Excel文档_[Asp.Net教程]
SQL Server 索引基础知识(1)--- 记录数据的基本格式_[SQL Server教程]
如何用C#写所见即所得的设计器_[Asp.Net教程]
谈谈个人地方分类网站的推广和赢利_JavaScript技术_编程技术
Reading number is top 10 pictures
2012 national geographic daily picture2
2012 national geographic daily picture9
BingBingFan apple dew point photo gallery3
Chinese paper-cut grilles art appreciation2
清纯性感的美眉2
Sell the barbecue as says father du breul3
The little girl with long hair1
Fierce! China's special forces training the devil1
Summer is most suitable for young people to travel in China1
A man's favorite things2
Download software ranking
Love the forty days
Tram sex maniac 2 (H) rar bag5
Wild things 2
Tram sex maniac 2 (H) rar bag14
Tram sex maniac 2 (H) rar bag4
Tram sex maniac 2 (H) rar bag19
Boxer's Top ten classic battle2
XML+Web+Service开发教程
电车之狼R
Dance with duck(male prostitution)
delv published in(发表于) 2014/1/6 9:10:59 Edit(编辑)
在Asp.Net2.0中可以方便的访问配置文件web.config_[Asp.Net教程]

在Asp.Net2.0中可以方便的访问配置文件web.config_[Asp.Net教程]

在Asp.Net2.0中可以方便的访问配置文件web.config_[Asp.Net教程]

Asp.Net2.0中我们可以方便的访问配置文件中,.NetFrameWork2.0新增加了 SystemWebSectionGroup 类。
允许用户以编程方式访问配置文件的 system.web 组。
比如判断web.config内是否为 debug="true",或者判断身份验证形式


SystemWebSectionGroup ws = new SystemWebSectionGroup();
CompilationSection cp = ws.Compilation;
用cp.Debug;就可以得到compilation节内关于"debug"的配置
AuthenticationSection as = ws.Authentication;
用 as.Mode 可以获取 authentication节中关于"mode"的配置,值为AuthenticationMode 枚举之一
AuthenticationMode的取值如下:
成员名称 说明
Forms 将基于 ASP.NET 窗体的身份验证指定为身份验证模式。
None 不指定身份验证。
Passport 将 Microsoft Passport 指定为身份验证模式。
Windows 将 Windows 指定为身份验证模式。在使用 Internet 信息服务 (IIS) 身份验证方法(基本、简要、集成 Windows (NTLM/Kerberos) 或证书)时适用此模式。



附:SystemWebSectionGroup 类的公共属性:
名称 说明
AnonymousIdentification 获取 anonymousIdentification 节。
Authentication 获取 authentication 节。
Authorization 获取 authorization 节。
BrowserCaps 获取 browserCaps 节。
ClientTarget 获取 clientTarget 节。
Compilation 获取 compilation 节。
CustomErrors 获取 customErrors 节。
Deployment 获取 deployment 节。
DeviceFilters 获取 deviceFilters 节。
Globalization 获取 globalization 节。
HealthMonitoring 获取 healthMonitoring 节。
HostingEnvironment 获取 hostingEnvironment 节。
HttpCookies 获取 httpCookies 节。
HttpHandlers 获取 httpHandlers 节。
HttpModules 获取 httpModules 节。
HttpRuntime 获取 httpRuntime 节。
Identity 获取 identity 节。
IsDeclarationRequired 获取一个值,该值指示是否需要声明此 ConfigurationSectionGroup 对象。 (从 ConfigurationSectionGroup 继承。)
IsDeclared 获取一个值,该值指示是否已声明此 ConfigurationSectionGroup 对象。(从 ConfigurationSectionGroup 继承。)
MachineKey 获取 machineKey 节。
Membership 获取 membership 节。
MobileControls 获取 mobileControls 节。
Name 获取此 ConfigurationSectionGroup 对象的名称属性。(从 ConfigurationSectionGroup 继承。)
Pages 获取 pages 节。
ProcessModel 获取 processModel 节。
Profile 获取 profile 节。
Protocols 获取 protocols 节。
RoleManager 获取 roleManager 节。
SectionGroupName 获取与此 ConfigurationSectionGroup 关联的节组名称。(从 ConfigurationSectionGroup 继承。)
SectionGroups 获取一个包含所有 ConfigurationSectionGroup 对象的 ConfigurationSectionGroup 对象,这些对象是此 ConfigurationSectionGroup 对象的子对象。(从 ConfigurationSectionGroup 继承。)
Sections 获取一个 ConfigurationSectionCollection,它包含此 ConfigurationSectionGroup 中的所有 ConfigurationSection 对象。(从 ConfigurationSectionGroup 继承。)
SecurityPolicy 获取 securityPolicy 节。
SessionState 获取 sessionState 节。
SiteMap 获取 siteMap 节。
Trace 获取 trace 节。
Trust 获取 trust 节。
Type 获取或设置此 ConfigurationSectionGroup 对象的类型。(从 ConfigurationSectionGroup 继承。)
UrlMappings 获取 urlMappings 节。
WebControls 获取 webControls 节。
WebParts 获取 webParts 节。
WebServices 获取 webServices 节。
XhtmlConformance 获取 xhtmlConformance 节。


来源:博客园





添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.