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

7/13/2011 5:54:13 AM
Gravatar
Total Posts 18439

Re: Upgrading to .Net4 Release

should not happen at all under .NET 4 hosting, if it does happen it is something weird about the machine. I would check with your host and verify that you really have .NET 4 and are using a .NET 4 integrated application pool.

The 9th and 10th items on our FAQ are relevant to this.

Hope that helps,

Joe

7/13/2011 11:20:23 PM
Gravatar
Total Posts 355

Re: Upgrading to .Net4 Release

I ran into this somewhat frequently with my previous hosting provider, until I was able to prove that it was a server issue; Joe is correct in that this is an issue with the .Net framework installation. If they re-install their framework installation on the server, it usually resolves the issue.

7/14/2011 9:26:11 AM
Gravatar
Total Posts 20

Re: Upgrading to .Net4 Release

Thanks for all your kind replies!

I got it resolved.  I asked and paid for .NET 4 hosting and got .NET 2.0.  I had to hammer the host to get it and prove I had something other than .NET 4.  Quite frustrating.

Paul

7/14/2011 1:51:30 PM
Gravatar
Total Posts 355

Re: Upgrading to .Net4 Release

The error message is pretty much truth right there; I haven't run into the issue at Arvixe, but I've gone through it enough with another hosting provider that the pain point is quite recognizable.  Glad you stuck to your guns, and got it resolved!

8/22/2011 4:55:20 PM
Gravatar
Total Posts 45

Re: Upgrading to .Net4 Release

IndigoTea,

I keep running into this error all the time with Arvixe when I install a new website to use .NET 4.0 hosting.  I can switch it over to .NET 4.0 Intergrated Pipeline mode, stop the server, upload mojoPortal (I downloaded the source from CodePlex and compiled myself), then start the website and I get the same error about "system.web.extensions".  The only way I can get it fixed is to contact support for them to set it to .NET 4.0 as the Website Panel software freaks out and won't let you change it.  This occurs on their flax server, for the site dallasmicro.net.

Hopefully they can make this more reliable by the time it comes for me to renew as it is very painful to get a new site up in a timely manor compared to other hosting companies I use.

Thanks,
Todd

8/22/2011 5:12:00 PM
Gravatar
Total Posts 355

Re: Upgrading to .Net4 Release

Todd,

I'll pass on your experience to the folks at Arvixe, and see if we can get the default for .Net sites set to 4.0 - that would save time and hassle for clients and support people. Thanks for your feedback!

8/25/2011 11:59:54 AM
Gravatar
Total Posts 167

Re: Upgrading to .Net4 Release

Hi, 

Similar issue here as well, however I manage my own server. 

I believe that I have .net 4 installed on the server as I have the folder C:\Windows\Microsoft.NET\Framework\v4.0.30319 as well as v3.0 and V3.5

I have a mojoportal installation running on 3.5 and have now set up (on a different drive on the same server) a 4.0 installation.

This new installation gets the 500 internals sever error and when I go into IIS to look at bits such as ".NET Profile" I get the 

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

as mentioned previously. If I go to view the site in visual studio I get the message that the site is V2.0 and do I want to update to 3.5, which I quickly escape from.

Any suggestions on where to look to resolve this. I am a bit ignorant with regards to whether a server can run both .net 3.5 and 4.0 versions of mojoportal. Ideally I would like to run both and upgrade the 3.5 version later if possible.

 

 

8/25/2011 12:03:53 PM
Gravatar
Total Posts 18439

Re: Upgrading to .Net4 Release

You need to use a .NET 4 application pool in order to make a site run under .NET 4.

See also the 9th and 10th items in our FAQ which relate to the section error.

Hope that helps,

Joe

8/25/2011 1:10:23 PM
Gravatar
Total Posts 167

Re: Upgrading to .Net4 Release

Sometimes the answer is too easy. 

Not being a master of IIS, I was not too confident with what you meant by 

You need to use a .NET 4 application pool in order to make a site run under .NET 4.

But as with most things you have a look round and the answer is staring you in the face.

For those who are like me to and were a bit confused what to do, all you need to do is go to IIS

Select Application pools and find the application pool for the .NET 4.0 site. Select this and then edit basic settings. In there is a dropdown box for ".NET Framework version" which in my case was set to ".NET Framework 2.0", I changed this to ".NET Framework 4.0" and the site is fixed. So much more easier that I was expecting.

Many thanks Joe

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