Reputation: 6217
Created a Web Application in ASP.NET (c# language), than Build -> Published to Desktop, moved all files and folders to the ./test
directory of the root of my localhost
, than go to localhost/test/Default.aspx
, and get this error message:
HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.
Points to this bit of code within web.config:
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
Actually, more digging reveals this:
There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined
Can I just define this in the root web.config file? Or is it safe to remove it altogether?
Upvotes: 1
Views: 2984
Reputation: 13960
If this entry is defined in machine.config, then it's considered duplicate. Either remove this entry from web.config or add a remove sentence before.
<remove name="scriptResourceHandler/>
Upvotes: 3