简体   繁体   中英

Problem deploying an ASP.NET site

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 .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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM