Ast35
asked on
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
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
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.
ASKER
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.
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\bd0d1f5 7\App_glob al.asax.nf vugfwt.0.v b': System Error &Hc0000005& (Visual Basic internal compiler error)
Source Error:
[No relevant source lines]
Source File: C:\Windows\Microsoft.NET\Framework\v 4.0.30319\ Temporary ASP.NET Files\rea\f78e6122\bd0d1f5 7\App_glob al.asax.nf vugfwt.0.v b : 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.N et\assembl y\GAC_MSIL \System.Se rviceModel \v4.0_4.0. 0.0__b77a5 c561934e08 9\System.S erviceMode l.dll" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_MSIL \System\v4 .0_4.0.0.0 __b77a5c56 1934e089\S ystem.dll" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_MSIL \System.Se rviceModel .Web\v4.0_ 4.0.0.0__3 1bf3856ad3 64e35\Syst em.Service Model.Web. dll" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_MSIL \System.We b.Services \v4.0_4.0. 0.0__b03f5 f7f11d50a3 a\System.W eb.Service s.dll" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_MSIL \System.Co re\v4.0_4. 0.0.0__b77 a5c561934e 089\System .Core.dll" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_MSIL \System.Se rviceModel .Activitie s\v4.0_4.0 .0.0__31bf 3856ad364e 35\System. ServiceMod el.Activit ies.dll" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_MSIL \System.Wo rkflowServ ices\v4.0_ 4.0.0.0__3 1bf3856ad3 64e35\Syst em.Workflo wServices. dll" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_MSIL \System.Ac tivities\v 4.0_4.0.0. 0__31bf385 6ad364e35\ System.Act ivities.dl l" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_32\S ystem.Ente rpriseServ ices\v4.0_ 4.0.0.0__b 03f5f7f11d 50a3a\Syst em.Enterpr iseService s.dll" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_MSIL \System.Se rviceModel .Activatio n\v4.0_4.0 .0.0__31bf 3856ad364e 35\System. ServiceMod el.Activat ion.dll" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_MSIL \System.Xm l\v4.0_4.0 .0.0__b77a 5c561934e0 89\System. Xml.dll" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_MSIL \Microsoft .CSharp\v4 .0_4.0.0.0 __b03f5f7f 11d50a3a\M icrosoft.C Sharp.dll" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_MSIL \System.Da ta.DataSet Extensions \v4.0_4.0. 0.0__b77a5 c561934e08 9\System.D ata.DataSe tExtension s.dll" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_MSIL \System.We b.DynamicD ata\v4.0_4 .0.0.0__31 bf3856ad36 4e35\Syste m.Web.Dyna micData.dl l" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_32\S ystem.Web\ v4.0_4.0.0 .0__b03f5f 7f11d50a3a \System.We b.dll" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_MSIL \System.Id entityMode l\v4.0_4.0 .0.0__b77a 5c561934e0 89\System. IdentityMo del.dll" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_MSIL \System.We b.Applicat ionService s\v4.0_4.0 .0.0__31bf 3856ad364e 35\System. Web.Applic ationServi ces.dll" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_MSIL \System.Co mponentMod el.DataAnn otations\v 4.0_4.0.0. 0__31bf385 6ad364e35\ System.Com ponentMode l.DataAnno tations.dl l" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_32\S ystem.Data \v4.0_4.0. 0.0__b77a5 c561934e08 9\System.D ata.dll" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_MSIL \System.Xm l.Linq\v4. 0_4.0.0.0_ _b77a5c561 934e089\Sy stem.Xml.L inq.dll" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_MSIL \System.Ru ntime.Seri alization\ v4.0_4.0.0 .0__b77a5c 561934e089 \System.Ru ntime.Seri alization. dll" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_MSIL \System.We b.Extensio ns\v4.0_4. 0.0.0__31b f3856ad364 e35\System .Web.Exten sions.dll" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_MSIL \System.Dr awing\v4.0 _4.0.0.0__ b03f5f7f11 d50a3a\Sys tem.Drawin g.dll" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_MSIL \System.De sign\v4.0_ 4.0.0.0__b 03f5f7f11d 50a3a\Syst em.Design. dll" /R:"C:\Windows\Microsoft.N et\assembl y\GAC_MSIL \System.Co nfiguratio n\v4.0_4.0 .0.0__b03f 5f7f11d50a 3a\System. Configurat ion.dll" /out:"C:\Windows\Microsoft .NET\Frame work\v4.0. 30319\Temp orary ASP.NET Files\rea\f78e6122\bd0d1f5 7\App_glob al.asax.nf vugfwt.dll " /D:DEBUG=1 /debug+ /nowarn:41008 /define:_MYTYPE=\"Web\" /imports:Microsoft.VisualB asic,Syste m,System.C ollections ,System.Co llections. Generic,Sy stem.Colle ctions.Spe cialized,S ystem.Comp onentModel .DataAnnot ations,Sys tem.Config uration,Sy stem.Linq, System.Tex t,System.T ext.Regula rExpressio ns,System. Web,System .Web.Cachi ng,System. Web.Dynami cData,Syst em.Web.Ses sionState, System.Web .Security, System.Web .Profile,S ystem.Web. UI,System. Web.UI.Web Controls,S ystem.Web. UI.WebCont rols.WebPa rts,System .Web.UI.Ht mlControls ,System.Xm l.Linq,Sys tem.Data,S ystem.Data .SqlClient ,Microsoft .Applicati onBlocks.D ata /warnaserror- /optionInfer+ "C:\Windows\Microsoft.NET\ Framework\ v4.0.30319 \Temporary ASP.NET Files\rea\f78e6122\bd0d1f5 7\App_glob al.asax.nf vugfwt.0.v b" "C:\Windows\Microsoft.NET\ Framework\ v4.0.30319 \Temporary ASP.NET Files\rea\f78e6122\bd0d1f5 7\App_glob al.asax.nf vugfwt.1.v b"
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\v 4.0.30319\ Temporary ASP.NET Files\rea\f78e6122\bd0d1f5 7\App_glob al.asax.nf vugfwt.0.v b : error BC31007: Unable to open module file 'C:\Windows\Microsoft.NET\ Framework\ v4.0.30319 \Temporary ASP.NET Files\rea\f78e6122\bd0d1f5 7\App_glob al.asax.nf vugfwt.0.v b': System Error &Hc0000005& (Visual Basic internal compiler error)
C:\Windows\Microsoft.NET\Framework\v 4.0.30319\ Temporary ASP.NET Files\rea\f78e6122\bd0d1f5 7\App_glob al.asax.nf vugfwt.1.v b : error BC31007: Unable to open module file 'C:\Windows\Microsoft.NET\ Framework\ v4.0.30319 \Temporary ASP.NET Files\rea\f78e6122\bd0d1f5 7\App_glob al.asax.nf vugfwt.1.v b': System Error &Hc0000005& (Visual Basic internal compiler error)
------------------------------------ ---------- ---------- ---------- ---------- ----
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
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?
ASKER
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
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
2.0 covers 3.5 and 3.5 sp1
ASKER
OK, I've added 2.0.
What I'm now getting on both applications is
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.
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.
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
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
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ah, thanks. I thought I had installed everything, but clearly not.
Anyway, both applications are now showing more or less the following -
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.e xe" /t:library /utf8output /R:"C:\Windows\assembly\GA C_MSIL\Sys tem.Design \2.0.0.0__ b03f5f7f11 d50a3a\Sys tem.Design .dll" /R:"C:\Windows\assembly\GA C_MSIL\Sys tem.Web.Se rvices\2.0 .0.0__b03f 5f7f11d50a 3a\System. Web.Servic es.dll" /R:"C:\Windows\assembly\GA C_MSIL\Sys tem.Web.Mo bile\2.0.0 .0__b03f5f 7f11d50a3a \System.We b.Mobile.d ll" /R:"C:\Windows\assembly\GA C_MSIL\Sys tem\2.0.0. 0__b77a5c5 61934e089\ System.dll " /R:"C:\Windows\assembly\GA C_MSIL\Sys tem.Xml.Li nq\3.5.0.0 __b77a5c56 1934e089\S ystem.Xml. Linq.dll" /R:"C:\Windows\assembly\GA C_32\Syste m.Enterpri seServices \2.0.0.0__ b03f5f7f11 d50a3a\Sys tem.Enterp riseServic es.dll" /R:"C:\Windows\assembly\GA C_MSIL\Sys tem.Runtim e.Serializ ation\3.0. 0.0__b77a5 c561934e08 9\System.R untime.Ser ialization .dll" /R:"C:\Windows\assembly\GA C_MSIL\Sys tem.Web.Ex tensions\3 .5.0.0__31 bf3856ad36 4e35\Syste m.Web.Exte nsions.dll " /R:"C:\Windows\assembly\GA C_MSIL\Sys tem.Xml\2. 0.0.0__b77 a5c561934e 089\System .Xml.dll" /R:"C:\Windows\assembly\GA C_32\Syste m.Data\2.0 .0.0__b77a 5c561934e0 89\System. Data.dll" /R:"C:\Windows\assembly\GA C_MSIL\Sys tem.Identi tyModel\3. 0.0.0__b77 a5c561934e 089\System .IdentityM odel.dll" /R:"C:\Windows\assembly\GA C_MSIL\Sys tem.Servic eModel\3.0 .0.0__b77a 5c561934e0 89\System. ServiceMod el.dll" /R:"C:\Windows\assembly\GA C_MSIL\Sys tem.Workfl owServices \3.5.0.0__ 31bf3856ad 364e35\Sys tem.Workfl owServices .dll" /R:"C:\Windows\assembly\GA C_32\Syste m.Web\2.0. 0.0__b03f5 f7f11d50a3 a\System.W eb.dll" /R:"C:\Windows\assembly\GA C_MSIL\Sys tem.Servic eModel.Web \3.5.0.0__ 31bf3856ad 364e35\Sys tem.Servic eModel.Web .dll" /R:"C:\Windows\assembly\GA C_MSIL\Sys tem.Core\3 .5.0.0__b7 7a5c561934 e089\Syste m.Core.dll " /R:"C:\Windows\assembly\GA C_MSIL\Sys tem.Config uration\2. 0.0.0__b03 f5f7f11d50 a3a\System .Configura tion.dll" /R:"C:\Windows\assembly\GA C_MSIL\Sys tem.Drawin g\2.0.0.0_ _b03f5f7f1 1d50a3a\Sy stem.Drawi ng.dll" /R:"C:\Windows\assembly\GA C_MSIL\Sys tem.Data.D ataSetExte nsions\3.5 .0.0__b77a 5c561934e0 89\System. Data.DataS etExtensio ns.dll" /out:"C:\Windows\Microsoft .NET\Frame work\v2.0. 50727\Temp orary ASP.NET Files\rea\f78e6122\bd0d1f5 7\App_glob al.asax.tb oveudp.dll " /D:DEBUG=1 /debug+ /define:_MYTYPE=\"Web\" /imports:Microsoft.VisualB asic,Syste m,System.C ollections ,System.Co llections. Specialize d,System.C onfigurati on,System. Text,Syste m.Text.Reg ularExpres sions,Syst em.Web,Sys tem.Web.Ca ching,Syst em.Web.Ses sionState, System.Web .Security, System.Web .Profile,S ystem.Web. UI,System. Web.UI.Web Controls,S ystem.Web. UI.WebCont rols.WebPa rts,System .Web.UI.Ht mlControls ,System.Da ta,System. Data.SqlCl ient,Micro soft.Appli cationBloc ks.Data /warnaserror- /optionInfer+ "C:\Windows\Microsoft.NET\ Framework\ v2.0.50727 \Temporary ASP.NET Files\rea\f78e6122\bd0d1f5 7\App_glob al.asax.tb oveudp.0.v b" "C:\Windows\Microsoft.NET\ Framework\ v2.0.50727 \Temporary ASP.NET Files\rea\f78e6122\bd0d1f5 7\App_glob al.asax.tb oveudp.1.v b"
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
ASKER
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.confi g
Requested URL http://localhost:80/REA/default.aspx
Physical Path C:\inetpub\wwwroot\REA\def ault.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.
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
Requested URL http://localhost:80/REA/default.aspx
Physical Path C:\inetpub\wwwroot\REA\def
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.
ASKER
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.
I'm going to ask the above as a new question.
ASKER
Resolved several issues including the original question even if we didn't get to the bottom of all the problems I was having.
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.
See http://www.asp.net/learn/w
"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
https://www.experts-exchange.com/questions/26180137/Config-Error-There-is-a-duplicate-'system-web-extensions-scripting-scriptResourceHandler'-section-defined.html