我怎么解决这个问题? :无法读取配置节'system.web.extensions',因为它缺少节声明

问题描述:

我该如何解决这个问题? :配置部分'system.web.extensions'无法读取,因为它缺少部分声明



它是我本地PC中的工作文件但是当我发布时Web服务器不工作。



问候,

Afzal

How can I solve this problem? : The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration

It is working file in my local PC but when I publish in Web Server its not working.

Regards,
Afzal

一个简单的谷歌搜索错误将为您提供许多方法来解决这个问题。



一个可能的问题是,IIS可以设置为以.Net 3.5或更早版本运行,并且您的web.config中有.Net 4项。由于有许多事情可以导致它,你需要经历每一种可能性并弄明白。



因为它适用于你的电脑我的猜测你在IIS中设置了错误的.Net版本。
A simple google search of the error will give you lots of ways to fix this.

One possible issue is that IIS could be set to run as .Net 3.5 or earlier and you have .Net 4 items in your web.config. Since there are many things that can cause it, you'll need to go through each of the possibilities and figure it out.

Since it works on your PC my guess is you have the wrong .Net version set in IIS.