473,386 Members | 1,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

configSections

I have the following configSections in my web.config. Again, it's not clear
to me what this is doing because I can delete the entire section and the
application compiles and runs fine. Why do I need this?

<configSections>
<sectionGroup name="system.web.extensions"
type="System.Web.Configuration.SystemWebExtensions SectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting"
type="System.Web.Configuration.ScriptingSectionGro up, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler"
type="System.Web.Configuration.ScriptingScriptReso urceHandlerSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication" />
<sectionGroup name="webServices"
type="System.Web.Configuration.ScriptingWebService sSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization"
type="System.Web.Configuration.ScriptingJsonSerial izationSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="Everywhere" />
<section name="profileService"
type="System.Web.Configuration.ScriptingProfileSer viceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication" />
<section name="authenticationService"
type="System.Web.Configuration.ScriptingAuthentica tionServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication" />
<section name="roleService"
type="System.Web.Configuration.ScriptingRoleServic eSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication" />
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>

Aug 22 '08 #1
3 2563
Hello MCM,

Thanks for using Microsoft Newsgroup Support Service, my name is Ji Zhou
[MSFT] and I will be working on this issue with you.

Based on my understanding, what we concern about now is the purpose of
configSections element in our Web.config file. If I have misunderstood,
please let me know. These declarations in the configSections element enable
us to configure ASP.NET applications that can be used by AJAX-enabled
clients, Windows Communication Foundation (WCF) clients (SOAP clients), and
.NET Framework clients.

* Enabling ASP.NET application services through the authenticationService,
roleService, and profileService elements.
* Configuring the script handler through the enableCompression and
enableCaching attributes of the scriptResourceHandler element.
* Configuring JSON serialization through the jsonSerialization element.

See this document: http://msdn.microsoft.com/en-us/library/bb546044.aspx.
We can delete them, if we do not configure about these features.

To know more general information about the ASP.NET configuration file,
please refer this document
http://msdn.microsoft.com/en-us/library/ms228256.aspx.

If you have any future questions about this, please feel free to let me
know.

Best regards,
Ji Zhou (v-****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 22 '08 #2
I'm sorry, but this is still not very clear to me. What do configSections do?
It sounds like they tell the compiler to look for other sections within
web.config - is that correct? But if that is true, then why don't I need
configSections for all my other web.config elements?

""Ji Zhou [MSFT]"" wrote:
Hello MCM,

Thanks for using Microsoft Newsgroup Support Service, my name is Ji Zhou
[MSFT] and I will be working on this issue with you.

Based on my understanding, what we concern about now is the purpose of
configSections element in our Web.config file. If I have misunderstood,
please let me know. These declarations in the configSections element enable
us to configure ASP.NET applications that can be used by AJAX-enabled
clients, Windows Communication Foundation (WCF) clients (SOAP clients), and
.NET Framework clients.

* Enabling ASP.NET application services through the authenticationService,
roleService, and profileService elements.
* Configuring the script handler through the enableCompression and
enableCaching attributes of the scriptResourceHandler element.
* Configuring JSON serialization through the jsonSerialization element.

See this document: http://msdn.microsoft.com/en-us/library/bb546044.aspx.
We can delete them, if we do not configure about these features.

To know more general information about the ASP.NET configuration file,
please refer this document
http://msdn.microsoft.com/en-us/library/ms228256.aspx.

If you have any future questions about this, please feel free to let me
know.

Best regards,
Ji Zhou (v-****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 22 '08 #3
Hello MCM,

Yes, you are right about purpose of configSections. Let me do some future
clarifications.

From the MSDN document
http://msdn.microsoft.com/en-us/library/ms228256.aspx , we know that the
configSections element is required because ASP.NET makes no presumptions
about how to handle settings within a configuration file. Instead, ASP.NET
delegates the processing of configuration data to configuration section
handlers.

To understand about the above description better, let us do the following
test:

1.Firstly, we create an empty web application, and open the Web.config file
in Visual Studio. We will see the configSections you post above.

2.We type "<test></test>" right behind the configSections element, and
press F5 to debug the application. We will receive an error says
"Unrecognized configuration section test."

3.We replace the text "<test></test>" with the text
"<system.web.extensions></system.web.extensions>", and then I press F5 to
debug. Everything works fine.

The reason is that if we want to use a kind of element, we firstly need to
declare it in the configSections element. ("test" is not declared, while
"system.web.extensions" is, in the configSections in the above experiment).

As to your question: why we can use the <system.webas well as other
elements without declaring them in the configSections? The reason is we
have a machine.config file which defines the default elements for us. We
can find this file in this location:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONF IG\. You can use the
notepad to view its content.

To know more about how to use <system.web.extensionsconfiguration, please
refer this link:
http://www.asp.net/AJAX/documentatio...SPNETAJAX.aspx
Best regards,
Ji Zhou (v-****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 25 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jaco De Villiers | last post by:
Hi, I have added the following group and section: <configSections> <section name="sampleSection" type="System.Configuration.SingleTagSectionHandler" /> <sectionGroup name="tilos.sdk">...
2
by: WFB | last post by:
Hi I have an application with a couple of referenced assemblies. The referenced assemblies and my application all share a few configuration settings with the same name but different values. Is...
1
by: eje | last post by:
I want to use configSections for applicationsettings but I get Exception creating section handler. My code in web.config: <configuration> <configSections> <sectionGroup...
1
by: Andrea Moro | last post by:
In web.config file I do as follow: <configsections> <sectiongroup name="Database"> <section name="Access" type=".... Ok problem is there in type. According to the help is only needed the...
2
by: Joseph Geretz | last post by:
Parser Error Message: Only one <configSections> element allowed. It must be the first child element of the root <configuration> element. OK, fine, easy enough to fix, I just need to copy and...
5
by: wolfgang wagner | last post by:
hi all! i'm trying to define a custom config section like described in the online help of VS2005: <configuration> <configSections> <section name="sampleSection"...
0
by: Jeffrey Hornby | last post by:
I'm getting "Exception in configuration section handler" when I start my web program and its indicating the opening tag of a custom configSection in my web.config. The relevant parts of the...
6
by: Peter Morris [Droopy eyes software] | last post by:
Hi all I added the following to my web.config immediately beneath the opening <configuration> declaration of my ASP.NET V2 website: <configSections> <section name="urlrewrites"...
7
by: =?Utf-8?B?RXZl?= | last post by:
I have the following sections defined in my app.config file: <configSections> <section name="1" type="System.Configuration.DictionarySectionHandler" /> <section name="2"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.