IIS7 deployment - duplicate 'system.web.extensions/scripting/scriptResourceHandler' section

后端 未结 15 2122
萌比男神i
萌比男神i 2020-11-29 15:56

On attempting to deploy a .net 3.5 website on the default app pool in IIS7 having the framework section set to 4.0, I get the following error.

There i

相关标签:
15条回答
  • 2020-11-29 16:25

    Set the application pool to 2.0, I did it and worked.

    0 讨论(0)
  • 2020-11-29 16:25

    Another way to avoid this problem that may help others is build your .net web service to version 4.0 or higher if possible.

    0 讨论(0)
  • 2020-11-29 16:26

    I've solved it, doing the following steps:

    1. I created a new application's group in IIS.
    2. Open advanced settings for the site or web application that is having this problem.
    3. And set the new application's group.

    Here you have the images of these steps:

    0 讨论(0)
  • 2020-11-29 16:27

    Apparently, other have (had) this problem. They rebuild in Framework 4.0. Can you?

    Also, see this about making sure your IIS is fresh.

    0 讨论(0)
  • 2020-11-29 16:30

    This is maybe the wrong answer for you. But this was the first hit on Google when I tried to solve my problem. With that said...

    The same error message occurred for me as well, but when I tried to run IIS Express through Visual Studio.

    My problem was that I mistakenly commited my applicationhost.config to TFS. Later when I tried to run the project on my laptop after getting the latest commits. that's when the error occurred.

    I found that the virtual directory path was wrong.

    <virtualDirectory path="/" physicalPath="C:\Users\giddan\Documents\Visual Studio 2015\Projects\ProjectName\DeV.ProjectName\DeV.ProjectName.Web" />
    

    Hope that this help somebody!

    This is my first post, so be gentle :)

    0 讨论(0)
  • 2020-11-29 16:32

    If your plan is to deploy to an IIS that has an Application Pool running in .net 4.0 you will need to cleanup the web.config that includes all the section Definitions that point to .net 3.5. The reason this fails is because these section definitions are already included in the root web.config in .NET 4.0 (see %windir%\microsoft.net\framework\v4.0.30319\config\machine.config) that include all the system.web.extensions declared already.

    Another quick fix is to have the application pool set to 2.0 just as your development machine appears to have,.

    0 讨论(0)
提交回复
热议问题