tags:

views:

34

answers:

1

I have written my ASP.NET web site code in Visual Studio 2008. When I'm uploading it to the remote server I'm getting an error message about a problem in the web configuration file:

Section or group name 'system.web.extensions' is already defined.Updates to this may occur at the configuration level where it is defined.

What is the reason for this error and what can be done to fix it?

I am new to ASP.NET.

A: 

A .NET applications configuration is stored in more than one file. Your configuration is in your application, such as Web.Config or App.Config, the other configurations are in the Machine on witch the application runs, their location is:

x:\\Microsoft.NET\Framework\\config\

May be you have no definition for system.web.extensions in your machine, you have defined system.web.extensions in your web.config and also remote server has definition for system.web.extensions. And as the error says, you are not allowed to modify section or group in the configuration hierarchy.

<sectionGroup name="system.web.extensions"
    type="System.Web.Configuration.SystemWebExtensionsSectionGroup, 
    System.Web.Extensions, Version=3.5.0.0, Culture=neutral, 
    PublicKeyToken=31BF3856AD364E35">
    ...
</sectionGroup>

Please check the Web.Config and Machine.Config files in remote server. If you really need to define and update system.web.extensions section in your web sites configuration, you will need to manipulate your remote servers configuration -which will also affect other applications in the server-. Or if you don't need may be you can get rid of system.web.extensions.

Good luck.

Musa Hafalır
Sorry to reply you like this but I just got the web application from my client,I had learn t C# 2 years back and now I am working in Php newer worked in .net I just got the ftp details and when I wanted to make it live after uploading this is happening and now I don't remember many things about .net thats why what u have answered could not be fetched by me exactly.Still I will try.Please if u can make it more simple for me please please..Thankyou for your answer I really appreciate you a lotSorry for that
Wasim
Briefly, you have a .NET application (your web site) it has a configuration (your web.config file), it runs on a server and server also has a configuration (machine.config). Configurations are hierarchically applied to your application. If you have definition of same section or group in more than one configuration, then it causes a compilation error.
Musa Hafalır
As my understanding, your remote server's configuration file has a section of system.web.extensions, and your web site has a configuration file with system.web.extensions section. And it causes a compilation error. Could you just delete the <sectionGroup name="system.web.extensions" ...>...</sectionGroup> node with its subnodes from your web.config file? It may work this way.
Musa Hafalır
Here is the MSDN document for configuration hierarchy and inheritance:http://msdn.microsoft.com/en-us/library/ms178685.aspxand this document explains file structure with sections:http://msdn.microsoft.com/en-us/library/w7w4sb0w.aspxI hope it will be helpful. Thanks.
Musa Hafalır