I'm running .NET 4...but the error messages indicate I'm not

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.
3/15/2011 8:54:56 AM
Gravatar
Total Posts 18

I'm running .NET 4...but the error messages indicate I'm not

I'm trying to run the latest version of mojo .NET 4.0 version, and I'm getting the error mentioned in the FAQ that happens when your .NET app pool is 3.5:

Error Summary
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed Error Information
Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Error Code 0x80070032
Config Error The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration 
Config File \\?\C:\projects\mojoportal_4\Web\web.config
Requested URL http://localhost:80/MojoNet4/
Physical Path C:\projects\mojoportal_4\Web\
Logon Method Not yet determined
Logon User Not yet determined
Config Source
1063:   </system.webServer>
1064:   <system.web.extensions>
1065:     <scripting>

However, when I go to IIS and click basic settings for the site, the application pool reads as "ASP.NET v4.0". I've also tried using the medium trust web.config, that didn't help either. Am I missing something with regards to setting up the IIS or something? Thanks.

 

3/15/2011 1:14:45 PM
Gravatar
Total Posts 18439

Re: I'm running .NET 4...but the error messages indicate I'm not

what about the root site at localhost, is that using a .NET 3.5 app pool or .NET 4?

3/15/2011 1:39:14 PM
Gravatar
Total Posts 18

Re: I'm running .NET 4...but the error messages indicate I'm not

It was running defaultapppool, I just tried switching it to 4.0 and doing an iisreset, but the problem is still there.

3/15/2011 1:48:59 PM
Gravatar
Total Posts 18439

Re: I'm running .NET 4...but the error messages indicate I'm not

It sounds like something is funky with your .NET 4 installation. The section should be declared in machine.config and therefore should not be needed in Web.config. You may want to consider trying to run aspnet_regiis to re-install .NET 4 in IIS.

You could potentially add the section declaration in Web.config but then you would have a non-standard setup and would need to remove it if you deploy to a different machine.

this is what I copied from my machine.config, possibly adding this near the top of your Web.config would get past the problem, but I would try re-installing .NET 4

<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>

you would probably need to edit out the allowDefinition attributes

Hope it helps,

Joe

3/15/2011 2:00:10 PM
Gravatar
Total Posts 18

Re: I'm running .NET 4...but the error messages indicate I'm not

I tried running aspnet_regiis -i, then doing iisreset, that didn't help. Are there any other steps I should take to reinstall? My installation's pretty new, btw. I just got Visual Studio 2010, which of course installed .Net 4. (up until that point I've been using 3.5 with vs 2008 on this machine for asp.net dev)

3/15/2011 2:19:51 PM
Gravatar
Total Posts 18439

Re: I'm running .NET 4...but the error messages indicate I'm not

Is there a web.config file in the folder corresponding to the root at localhost?

If so, try removing it.

Hope it helps,

Joe

3/15/2011 2:20:59 PM
Gravatar
Total Posts 18

Re: I'm running .NET 4...but the error messages indicate I'm not

An additional update to what I just posted: I tried creating a asp.net 4 project of my own in vs2010 and ran it using iis instead of using the debug server; it ran fine, so apparently .net 4 does work on the machine at least some of the time.

P.S., there is no master web.config in the root for localhost

3/15/2011 2:32:02 PM
Gravatar
Total Posts 18439

Re: I'm running .NET 4...but the error messages indicate I'm not

ok, but does your little app have the section <system.web.extensions> in the web.config like mojoPortal has? It won't cause an error if that section is not there.

The declaration is only needed if the section is present, but the declaration should be in machine.config for .NET 4. You might inspect your machine.config under:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config

and see if it has the sectionGroup declared.

see also the comments (especially the last one at the bottom) on this blog post, it seems at least some others have had this problem and had to add the declaration in Web.config

Hope it helps,

Joe

3/15/2011 3:17:41 PM
Gravatar
Total Posts 18

Re: I'm running .NET 4...but the error messages indicate I'm not

I checked the machine config, it has this section:

<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>

I tried adding this section to my web.config, so it begins like this:

<?xml version="1.0"?>
<configuration>
  <configSections>
    <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>
<appSettings/>
<connectionStrings/>
<system.web>
  <pages validateRequest="false" enableViewStateMac="false" viewStateEncryptionMode="Auto" maxPageStateFieldLength="100" controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
   <namespaces>
    <add namespace="System.Globalization"/>
    <add namespace="mojoPortal.Business"/>

...

But the problem persists. Am I doing something wrong with this fix?

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