Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3222
  • Last Modified:

Error - 'There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined '

OK, basically, I have been given the files for a website to have a look at and I am trying to get it to run on my local machine. The machine is Windows Vista Premium running IIS 7.

I copied the files into a subdirectory of wwwroot and clicked 'convert to application' in IIS.

When I load a web page, I get the attached display as a result.

As an experiment, I did the same with a web application which I had created using Visual Web Developer 2010  which is is currently running correctly on a server using IIS6, and got the same error display.

I'd appreciated any help in resolving this, as I really need to get this site running locally as soon as possible.

Thanks in advance.
capture1.jpg
0
Ast35
Asked:
Ast35
  • 10
  • 7
1 Solution
 
Dhanasekaran SengodanCommented:
This is a known issue with ASP.NET 4.0 / vs 2010

See http://www.asp.net/learn/whitepapers/aspnet4/breaking-changes#0.1__Toc256770149

"The workaround for the second scenario is to delete or comment out all the system.web.extensions configuration section definitions and configuration section group definitions from the application-level Web.config file. These definitions are usually at the top of the application-level Web.config file and can be identified by the configSections element and its children."


Look this

http://forums.asp.net/p/1571308/3939106.aspx

http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/Q_26180137.html
0
 
Ramone_HamiltonCommented:
Just a quick question, have you already checked the web.config of the application and made sure that there are not two sections named scriptResourceHandler within your web.config?  A simple find in textpad should be able to answer that quickly.  If so simply remove the duplicate section from your web.config.
0
 
Ast35Author Commented:
Thanks for your replies.

There were not duplicate sections in either. I have now commented out the configSections group in the web.config files of both applications.

I am now getting this output for the site I want to get running and a similar [No relevant source lines] error page for the C# application I wrote.


Server Error in '/REA' Application.
--------------------------------------------------------------------------------

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC31007: Unable to open module file 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\rea\f78e6122\bd0d1f57\App_global.asax.nfvugfwt.0.vb': System Error &Hc0000005& (Visual Basic internal compiler error)

Source Error:

 

[No relevant source lines]
 

Source File: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\rea\f78e6122\bd0d1f57\App_global.asax.nfvugfwt.0.vb :    Line: 0



Compiler Warning Messages:
Warning: BC40057: Namespace or type specified in the project-level Imports 'Microsoft.ApplicationBlocks.Data' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
Source Error:

vbc :  

[No relevant source lines]
 




Show Detailed Compiler Output:


¿c:\windows\system32\inetsrv> "C:\Windows\Microsoft.NET\Framework\v4.0.30319\vbc.exe" /t:library /utf8output /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activation\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activation.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DynamicData.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Design\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Design.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /out:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\rea\f78e6122\bd0d1f57\App_global.asax.nfvugfwt.dll" /D:DEBUG=1 /debug+ /nowarn:41008 /define:_MYTYPE=\"Web\" /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Generic,System.Collections.Specialized,System.ComponentModel.DataAnnotations,System.Configuration,System.Linq,System.Text,System.Text.RegularExpressions,System.Web,System.Web.Caching,System.Web.DynamicData,System.Web.SessionState,System.Web.Security,System.Web.Profile,System.Web.UI,System.Web.UI.WebControls,System.Web.UI.WebControls.WebParts,System.Web.UI.HtmlControls,System.Xml.Linq,System.Data,System.Data.SqlClient,Microsoft.ApplicationBlocks.Data /warnaserror- /optionInfer+  "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\rea\f78e6122\bd0d1f57\App_global.asax.nfvugfwt.0.vb" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\rea\f78e6122\bd0d1f57\App_global.asax.nfvugfwt.1.vb"


Microsoft (R) Visual Basic Compiler version 10.0.30319.1
Copyright (c) Microsoft Corporation.  All rights reserved.

vbc : warning BC40057: Namespace or type specified in the project-level Imports 'Microsoft.ApplicationBlocks.Data' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\rea\f78e6122\bd0d1f57\App_global.asax.nfvugfwt.0.vb : error BC31007: Unable to open module file 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\rea\f78e6122\bd0d1f57\App_global.asax.nfvugfwt.0.vb': System Error &Hc0000005& (Visual Basic internal compiler error)
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\rea\f78e6122\bd0d1f57\App_global.asax.nfvugfwt.1.vb : error BC31007: Unable to open module file 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\rea\f78e6122\bd0d1f57\App_global.asax.nfvugfwt.1.vb': System Error &Hc0000005& (Visual Basic internal compiler error)


 




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
Ramone_HamiltonCommented:
I noticed something!  The application pool you are running under is ASP.NET 4.0  the web.config that you had earlier in this post is pointing to .NET 3.5.  Do you have enough of the project to load it into Visual Web Developer yourself?
0
 
Ast35Author Commented:
Possibly, but I'd rather be able to run it without changing that much of it at this point.

I've installed the 3.5 framework, but the only application pools that I can see in IIS are 1.1 and 4.0.  When I go to 'add application pool', the only other option I have is 2.0
0
 
Ramone_HamiltonCommented:
2.0 covers 3.5 and 3.5 sp1
0
 
Ast35Author Commented:
OK, I've added 2.0.

What I'm now getting on both applications is

Error Summary
HTTP Error 404.17 - Not Found
The requested content appears to be script and will not be served by the static file handler. Detailed Error InformationModule StaticFileModule
Notification ExecuteRequestHandler
Handler StaticFile
Error Code 0x80070032
Requested URL http://localhost:80/REA/default.aspx 
Physical Path C:\inetpub\wwwroot\REA\default.aspx
Logon Method Anonymous
Logon User Anonymous
 Most likely causes:
The request matched a wildcard mime map. The request is mapped to the static file handler. If there were different pre-conditions, the request will map to a different handler.
 Things you can try:
If you want to serve this content as a static file, add an explicit MIME map.
 

After Googling, I changed the 'Managed pipeline mode' from 'Integrated' to 'Classic', in the hope that that would make a difference, but it didn't.
0
 
Ramone_HamiltonCommented:
Ok, this just means that you haven't allowed access to the web service extensions.  Here is how you do that:

in IIS6:

Open up IIS Manager
Expand the computer name
Click on the folder named Web Service Extensions
In the window pane to the right select ASP.NET v2.0.50727
Click the allow button

in IIS7

Open up IIS Manager
Click on the computer name
Select ISAPI and CGI Restrictions
Make sure the one for .NET v2.0.50727 is set to allowed
0
 
Ast35Author Commented:
ISAPI and CGI Restrictions doesn't seem to be on the features list.

 Screen capture
0
 
Ramone_HamiltonCommented:
Make sure that you click on the computer name not the actual web site name.  I believe you have clicked on a web site that is up under the Sites node in the treeview.  Click on the  computer name two levels up.  It should have a globe with a computer tower in front of it.
0
 
Ast35Author Commented:
I'm afraid not, I'm definitely clicking on the computer icon.

 SCap
0
 
Ramone_HamiltonCommented:
You are indeed right.  It seems that this feature needs to be installed, http://forums.iis.net/p/1133028/1962154.aspx.  I think I initially installed everything under IIS when setting up my work machine, but when looking at my home machine it looked like yours.

If you go to Control Panel->Programs and Features->Turn Windows features on or off you hould be able to install it under the IIS tab.  Specifically it's under Internet Information Services->World Wide Web Services->Application Development Features->ISAPI Extensions.
0
 
Ast35Author Commented:
Ah, thanks. I thought I had installed everything, but clearly not.

Anyway, both applications are now showing more or less the following -

Server Error in '/REA' Application.
--------------------------------------------------------------------------------

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC2000: compiler initialization failed unexpectedly: 0x80070005

Source Error:

 

[No relevant source lines]
 

Source File: vbc : Fatal    Line: 0



Show Detailed Compiler Output:


c:\windows\system32\inetsrv> "C:\Windows\Microsoft.NET\Framework\v3.5\vbc.exe" /t:library /utf8output /R:"C:\Windows\assembly\GAC_MSIL\System.Design\2.0.0.0__b03f5f7f11d50a3a\System.Design.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\Windows\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\Windows\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\Windows\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Data.DataSetExtensions\3.5.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /out:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\rea\f78e6122\bd0d1f57\App_global.asax.tboveudp.dll" /D:DEBUG=1 /debug+ /define:_MYTYPE=\"Web\" /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Specialized,System.Configuration,System.Text,System.Text.RegularExpressions,System.Web,System.Web.Caching,System.Web.SessionState,System.Web.Security,System.Web.Profile,System.Web.UI,System.Web.UI.WebControls,System.Web.UI.WebControls.WebParts,System.Web.UI.HtmlControls,System.Data,System.Data.SqlClient,Microsoft.ApplicationBlocks.Data /warnaserror- /optionInfer+  "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\rea\f78e6122\bd0d1f57\App_global.asax.tboveudp.0.vb" "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\rea\f78e6122\bd0d1f57\App_global.asax.tboveudp.1.vb"


Microsoft (R) Visual Basic Compiler version 9.0.30729.1
Copyright (c) Microsoft Corporation.  All rights reserved.

vbc : Fatal error BC2000 : compiler initialization failed unexpectedly: 0x80070005

 




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4206; ASP.NET Version:2.0.50727.4209
0
 
Ast35Author Commented:
Thanks for all your help yesterday.

I gave up on the Vista machine, and have installed it on a Windows 7 machine. I think I've installed everything related to IIS.

This time, the application which I wrote myself in Visual Web Developer is working correctly, but I'm getting the error for the one I've been given which I have to get working  -

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      0x8007000d
Config Error      
Config File      \\?\C:\inetpub\wwwroot\REA\web.config
Requested URL      http://localhost:80/REA/default.aspx
Physical Path      C:\inetpub\wwwroot\REA\default.aspx
Logon Method      Not yet determined
Logon User      Not yet determined
Config Source

   -1:
    0:

Links and More Information This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.

View more information »


The web.config is not empty. I wasn't sure if I should post a separate question. Again, I'd appreciate any assistance.

0
 
Ast35Author Commented:
OK, I'm going to close this question, because you have probably answered the original question and several others, Ramone, thanks.

I'm going to ask the above as a new question.
0
 
Ast35Author Commented:
Resolved several issues including the original question even if we didn't get to the bottom of all the problems I was having.
0
 
Ramone_HamiltonCommented:
Sorry I have been MIA, work kicked my butt for a second there.  Forget the points, I'll take a look at this and see if we can't iron this out.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 10
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now