I am developing a .net 4.0 web application where I host it in IIS. The application was successfully hosted several times without using the <system.web.extensions> web.config in web.config .
The application is published without any errors, but when I try to host it using IIS and try to enable Directory Browsing , it throws an error The configuration section system.web,extensions cannot be read because its missing a section declaration . I already installed it as a .net 4.0 application from the application pool, but still threw an error.
Below is my web.config ,
<?xml version="1.0"?> <configuration> <system.web> <compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="MySql.Data, Version=6.5.4.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/> <add assembly="System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> </assemblies> </compilation> <httpRuntime requestValidationMode="2.0" executionTimeout="1000" maxRequestLength="2147483647" /> </system.web> <system.web.extensions> <scripting> <webServices> <jsonSerialization maxJsonLength="2147483647"> </jsonSerialization> </webServices> </scripting> </system.web.extensions> </configuration>
Can I find out what I'm doing wrong here ... this is such a headache, and I tried most of the resources on the Internet, but everyone suggests installing the application pool on .net 4.0 , which I already did ..
Thank you for help:)
source share