简单问题-这个web.config文件错在哪里? <configuration> <configSections> <section name="test" type="System.Web.Configuration.HttpConfigurationContext" /> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <appSettings> <add name="test" type="System.Web.Configuration.DictionarySectionHandler" /> </appSettings> 如果你要定义自己的节请按照<configuration> <configSections> <section name="test" type="" /> <------ 定义节是section </configSections> <test> <add ... /> <------ 节内添加项目是add </test>...</configuration>appSettings是默认的配置节 <configSections> <add name="test" type="System.Web.Configuration.HttpConfigurationContext"/> </configSections>===========>>> <appSettings> <add name="test" type="System.Web.Configuration.HttpConfigurationContext"/> </appSettings>or <appSettings> <add key="mytestkey" value="My first configuration"/> </appSettings> 改成 <configSections> <section name="test" type="System.Web.Configuration.HttpConfigurationContext" /> </configSections>错误消息:配置错误 说明: 在处理向该请求提供服务所需的配置文件时出错。请检查下面的特定错误详细信息并适当地修改配置文件。 分析器错误信息: 未找到类型 System.Web.Configuration.HttpConfigurationContext 上的构造函数。源错误: 行 4: 行 5: <configSections>行 6: <section name="test" type="System.Web.Configuration.HttpConfigurationContext" />行 7: </configSections>行 8: 源文件: E:\Inetpub\wwwroot\mpc\asp.net完全入门\web.config 行: 6 改成 <appSettings> <add name="test" type="System.Web.Configuration.HttpConfigurationContext" /> </appSettings>错误消息:配置错误 说明: 在处理向该请求提供服务所需的配置文件时出错。请检查下面的特定错误详细信息并适当地修改配置文件。 分析器错误信息: 无法识别的元素源错误: 行 5: <appSettings>行 6: <add name="test" type="System.Web.Configuration.HttpConfigurationContext" />行 7: </appSettings>行 8: 行 9: ' <test> 源文件: E:\Inetpub\wwwroot\mpc\asp.net完全入门\web.config 行: 7 用这个呢<appSettings> <add key="mytestkey" value="My first configuration"/></appSettings> 只用这个吗?<configuration><appSettings> <add key="mytestkey" value="My first configuration"/></appSettings></configuration>那在aspx页里要怎么提取? 你可以添加很多个<appSettings> <add key="key2" value="value1"/> <add key="key2" value="value2"/> .....</appSettings>取值的时候string myStr = System.Configuration.ConfigurationSettings.AppSettings["key_name"]; 请问这个如何实现 多种角色 DateTime根据年月查询 网页自登陆问题,求高人指点 权限配置问题 使用母版出现错误????????? 求助关于ASP.NET2.0里面HTML的问题 asp.net取js cookie的问题 各位老大 动动 小拇指 帮解决下 静态分页列表,新闻是在不停的增加, 难道增加一条就要重新生成所有的静态分页列表吗? 请问 C# 有没有操作浏览器中框架方面的语句,是不是一定要结合JAVASCRIPT才能! 大侠们帮帮忙,郁闷之至:首次运行非常正常,刷新页面或再次进入此asp.net页面时老报错。 怎样点击“删除”后出来“是”和“否”的确认?
<add name="test" type="System.Web.Configuration.DictionarySectionHandler" />
</appSettings>
<configuration>
<configSections>
<section name="test" type="" /> <------ 定义节是section
</configSections> <test>
<add ... /> <------ 节内添加项目是add
</test>...
</configuration>appSettings是默认的配置节
<add name="test" type="System.Web.Configuration.HttpConfigurationContext"/>
</configSections>===========>>>
<appSettings>
<add name="test" type="System.Web.Configuration.HttpConfigurationContext"/>
</appSettings>or <appSettings>
<add key="mytestkey" value="My first configuration"/>
</appSettings>
<configSections>
<section name="test" type="System.Web.Configuration.HttpConfigurationContext" />
</configSections>
错误消息:
配置错误
说明: 在处理向该请求提供服务所需的配置文件时出错。请检查下面的特定错误详细信息并适当地修改配置文件。 分析器错误信息: 未找到类型 System.Web.Configuration.HttpConfigurationContext 上的构造函数。源错误:
行 4:
行 5: <configSections>
行 6: <section name="test" type="System.Web.Configuration.HttpConfigurationContext" />
行 7: </configSections>
行 8:
源文件: E:\Inetpub\wwwroot\mpc\asp.net完全入门\web.config 行: 6
<appSettings>
<add name="test" type="System.Web.Configuration.HttpConfigurationContext" />
</appSettings>错误消息:
配置错误
说明: 在处理向该请求提供服务所需的配置文件时出错。请检查下面的特定错误详细信息并适当地修改配置文件。 分析器错误信息: 无法识别的元素源错误:
行 5: <appSettings>
行 6: <add name="test" type="System.Web.Configuration.HttpConfigurationContext" />
行 7: </appSettings>
行 8:
行 9: ' <test>
源文件: E:\Inetpub\wwwroot\mpc\asp.net完全入门\web.config 行: 7
<add key="mytestkey" value="My first configuration"/>
</appSettings>
<configuration>
<appSettings>
<add key="mytestkey" value="My first configuration"/>
</appSettings>
</configuration>那在aspx页里要怎么提取?
<appSettings>
<add key="key2" value="value1"/>
<add key="key2" value="value2"/>
.....
</appSettings>取值的时候
string myStr = System.Configuration.ConfigurationSettings.AppSettings["key_name"];