Solved

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

Posted on 2011-03-21
18
2,667 Views
Last Modified: 2012-05-11
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
Comment
Question by:Ast35
  • 10
  • 7
18 Comments
 
LVL 14

Expert Comment

by:Dhanasekaran Sengodan
ID: 35180059
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
 
LVL 6

Expert Comment

by:Ramone_Hamilton
ID: 35180399
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
 

Author Comment

by:Ast35
ID: 35180531
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
 
LVL 6

Expert Comment

by:Ramone_Hamilton
ID: 35180561
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
 

Author Comment

by:Ast35
ID: 35180858
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
 
LVL 6

Expert Comment

by:Ramone_Hamilton
ID: 35180887
2.0 covers 3.5 and 3.5 sp1
0
 

Author Comment

by:Ast35
ID: 35181135
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
 
LVL 6

Expert Comment

by:Ramone_Hamilton
ID: 35181829
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
 

Author Comment

by:Ast35
ID: 35182373
ISAPI and CGI Restrictions doesn't seem to be on the features list.

 Screen capture
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 6

Expert Comment

by:Ramone_Hamilton
ID: 35182964
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
 

Author Comment

by:Ast35
ID: 35183093
I'm afraid not, I'm definitely clicking on the computer icon.

 SCap
0
 
LVL 6

Accepted Solution

by:
Ramone_Hamilton earned 500 total points
ID: 35183299
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
 

Author Comment

by:Ast35
ID: 35183708
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
 

Author Comment

by:Ast35
ID: 35197570
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
 

Author Comment

by:Ast35
ID: 35199827
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
 

Author Closing Comment

by:Ast35
ID: 35199869
Resolved several issues including the original question even if we didn't get to the bottom of all the problems I was having.
0
 
LVL 6

Expert Comment

by:Ramone_Hamilton
ID: 35200477
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
 

Author Comment

by:Ast35
ID: 35200713
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
This video discusses moving either the default database or any database to a new volume.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now