Upgrading to .Net4 Release

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
6/7/2010 8:08:30 AM
Gravatar
Total Posts 110

Upgrading to .Net4 Release

Hi,

My website is in a .Net4.0 app pool and I have updated my mojoPortal site with the .Net4 package of the latest release.  Now I receive an 500 - Internal Server Error page and I have this returned in the stack trace:

System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Filename: \\?\C:\xxx\xxx\scdpmonline.org\wwwroot\web.config
Line number: 1053
Error: The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration


at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at DotNetPanel.Providers.Web.WebServer.GetSite(String siteId)
at DotNetPanel.EnterpriseServer.WebServerController.GetWebSite(Int32 siteItemId)
at DotNetPanel.EnterpriseServer.esWebServers.GetWebSite(Int32 siteItemId)
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at DotNetPanel.EnterpriseServer.esWebServers.GetWebSite(Int32 siteItemId)
at DotNetPanel.Portal.WebSitesEditSite.BindWebSite() in D:\junk\DNP2.8.10\DNP.WebPortal\DesktopModules\DotNetPanel\WebSitesEditSite.ascx.cs:line 158 

 

Any thoughts?

 

Thanks.

6/7/2010 8:17:02 AM
Gravatar
Total Posts 18439

Re: Upgrading to .Net4 Release

Hi,

The error message:

Error: The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration

indicates that you are not running under .NET 4 because that configuration section is needed for .NET 3.5 but not .NET 4.

The rest of what you posted is not errors happening in mojoportal code but looks like something from the DotPanel web control panel

Hope it helps,

Joe

6/7/2010 8:21:39 AM
Gravatar
Total Posts 110

Re: Upgrading to .Net4 Release

My web host assured me I was on .NET4 hosting but I had a feeling you might say that... I've pushed back to the host t get it sorted.

 

Thanks.

6/7/2010 1:01:22 PM
Gravatar
Total Posts 110

Re: Upgrading to .Net4 Release

Hi,

The web host is insisting there is an issue with the web.config file.  Here is there response.

---

I have double checked on your site and it was assigned to .net 4.0 application pool.
In the IIS when I tried to click on the handler mapping section, I got the syntax error on your web.config and I could not access the handler mapping section. And when I tried to change it to .net 2.0 I also got the same error message.
And I am pretty sure the issue is caused by your web.config content. Thanks.

---

Any thoughts on what I can do from here?

PS.  I am using a web host that you advertise, seekdotnet.com.

 

Thanks.

6/7/2010 1:24:47 PM
Gravatar
Total Posts 18439

Re: Upgrading to .Net4 Release

Are you sure you are using the download for 4.0 .NET and are using the new Web.config?

If the error is still:

Error: The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration

then I think your host is mistaken or else you have another .NET 3.5 app trying to run in the same application pool.

In .NET 3.5 this is needed at the top of Web.config:

<configSections>
  <!-- Comment this out in Medium Trust -->
  <section name="neatUpload" type="Brettle.Web.NeatUpload.ConfigSectionHandler, Brettle.Web.NeatUpload" allowLocation="true"/>
  <sectionGroup name="system.web"></sectionGroup>
  <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
   <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
    <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
    <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
     <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
     <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
     <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
     <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
    </sectionGroup>
   </sectionGroup>
  </sectionGroup>
 </configSections>

In .NET 4 most of that is now in machine.config and it only needs this in the top of Web.config:

<configSections>
  <!-- Comment this out in Medium Trust -->
  <section name="neatUpload" type="Brettle.Web.NeatUpload.ConfigSectionHandler, Brettle.Web.NeatUpload" allowLocation="true"/>
  <sectionGroup name="system.web"></sectionGroup>
 </configSections>

So if you get an error about it missing the section for system.web.extensions then it must not be .NET 4 or else you have more than one web app like if you have some other .NET app running in a virtual directory below mojoportal that needs 3.5 .NET, that arrangement will not work.

If mojoportal for .NET 4 is the only thing you have installed in your hosting then the host is mistaken. system.web.extensions section is not needed in Web.config for .NET 4

Hope it helps,

Joe

6/7/2010 1:30:37 PM
Gravatar
Total Posts 110

Re: Upgrading to .Net4 Release

Thanks Joe, I will push back to the host again but they are really not helpful so not holding out much hope.  

I am definitely using the .Net4.0 web.config file (I've replaced it about 5 times to make certain) and it is the only site hosted so the only thing left is that it is not hosted in .Net4.0.

I might end going back to .Net3.5 if they don't resolve this soon which will be a shame, but needs must if I want my site back online :-)

Thank you again.

6/7/2010 1:33:29 PM
Gravatar
Total Posts 18439

Re: Upgrading to .Net4 Release

I would point put the host that the error message is pointing to code in DotNetPanel not mojoPortal. Maybe the version of DotNetPanel on the server is not compatible with .NET 4. DotNetPanel is what is complaining about the mojoPortal Web.config file, not mojoportal.

Hope it helps,

Joe

6/7/2010 3:28:15 PM
Gravatar
Total Posts 110

Re: Upgrading to .Net4 Release

The web host has got the site running by commenting out the following lines from the web.config file.

<system.web.extensions>
  <scripting>
   <scriptResourceHandler enableCompression="true" enableCaching="true"/>
   <webServices>
    <authenticationService enabled="true" requireSSL="false"/>
    <roleService enabled="true"/>
   </webServices>
  </scripting>
 </system.web.extensions>

Excuse my lack of knowledge in this area but will this affect the site in anyway or should it all work just fine with this workaround in place?

Thanks.

6/8/2010 6:36:11 AM
Gravatar
Total Posts 18439

Re: Upgrading to .Net4 Release

Hi David,

It may be ok, I'm not sure, but my suspicion is that the host has modified their machine.config and by intent or by accident they are missing some declarations in their machine,.config file for .NET 4. In my machine.config the declaration for the system.web.extensions section looks like this:

<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
   <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
    <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
    <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
     <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
     <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
     <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
     <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
    </sectionGroup>
   </sectionGroup>
  </sectionGroup>

but if it is missing in their machine.config, another workaround might be to replace the config section the top of Web.config like this:

<configSections>
  <!-- Comment this out in Medium Trust -->
  <section name="neatUpload" type="Brettle.Web.NeatUpload.ConfigSectionHandler, Brettle.Web.NeatUpload" allowLocation="true"/>
  <sectionGroup name="system.web"></sectionGroup>
  <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
   <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
    <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
    <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
     <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
     <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
     <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
     <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
    </sectionGroup>
   </sectionGroup>
  </sectionGroup>
 </configSections>

Then you may be able to uncomment the other section. If it were declared correctly in machine.config then it would not need to be declared in Web.config

Hope it helps,

Joe

7/12/2011 2:43:46 PM
Gravatar
Total Posts 20

Re: Upgrading to .Net4 Release

Hey,

Seems I am getting the exact errors as David.  Although I am doing a clean installation on an alleged .NET 4 server.  Did the workaround remain stable (commenting out the web.config lines)?  Was there a better solution?  Thanks.

Paul

7/12/2011 2:46:04 PM
Gravatar
Total Posts 20

Re: Upgrading to .Net4 Release

Oh.  I am running the latest version of Mojoportal (mojoportal-2-3-6-7-mssql-net40-deploymentfiles.zip).

Paul

You must sign in to post in the forums. This thread is closed to new posts.