Error 500 - Internal Server Error because of missing a section declaration

0

I accidentally uninstall .Net Framework and reinstalled back the same version 4.5

But my server can go online but cannot be accessed due to internal server error. Error Code: 0x80070032

After checking, it seems that line number 11 of the configuration section 'system.web.extensions' cannot be read because it is missing a section declaration. But I do not know what to change.

Web config file code

<?xml version="1.0" encoding="utf-8"?>
<configuration>

The following attributes can be set on the <httpRuntime> tag.
  <system.Web>
    <httpRuntime targetFramework="4.5" />
  </system.Web>

<system.web.extensions>
<scripting>
  <webServices>
    <jsonSerialization maxJsonLength="50000000" />
  </webServices>
</scripting>
</system.web.extensions>
<system.web>
<!--  maxRequestLength
      Indicates the maximum file upload size supported by ASP.NET. This limit can be 
      used to prevent denial of service attacks caused by users posting large files to 
      the server. The size specified is in kilobytes. The default is 4096 KB (4 MB).
-->
<httpRuntime maxRequestLength="102400" executionTimeout="3600" />
<!--  DYNAMIC DEBUG COMPILATION
      Set compilation debug="true" to enable ASPX debugging.  Otherwise, setting this value to
      false will improve runtime performance of this application. 
      Set compilation debug="true" to insert debugging symbols (.pdb information)
      into the compiled page. Because this creates a larger file that executes
      more slowly, you should set this value to true only when debugging and to
      false at all other times. For more information, refer to the documentation about
      debugging ASP .NET files.
-->
<compilation defaultLanguage="c#" debug="true" targetFramework="4.5" />
<!--  CUSTOM ERROR MESSAGES
      Set customError mode values to control the display of user-friendly 
      error messages to users instead of error details (including a stack trace):

      "On" Always display custom (friendly) messages  
      "Off" Always display detailed ASP.NET error information.
      "RemoteOnly" Display custom (friendly) messages only to users not running 
      on the local Web server. This setting is recommended for security purposes, so 
      that you do not display application detail information to remote clients.
-->
<customErrors defaultRedirect="public/error.aspx" mode="RemoteOnly" />
<!--  AUTHENTICATION 
      This section sets the authentication policies of the application. Possible modes are "Windows", "Forms", 
      "Passport" and "None"
-->
<authentication mode="Forms">
  <forms name="JoeboyAuth" loginUrl="public/signin.aspx" protection="None" path="/" />
</authentication>
<pages theme="Skin1">
  <namespaces>
    <add namespace="System.Web.Optimization" />
  </namespaces>
  <controls>
    <add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" />
  </controls>
</pages>

Already reinstalled Framework 4.5 but still not working. Do suggest on what to do in this situation

system.web.extensions
asked on Stack Overflow Nov 5, 2019 by yi hoong ho

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0