IIS7 배포- 'system.web.extensions / scripting / scriptResourceHandler'섹션 복제
프레임 워크 섹션이 4.0으로 설정된 IIS7의 기본 앱 풀에 .net 3.5 웹 사이트를 배포하려고하면 다음 오류가 발생합니다.
중복 된 'system.web.extensions / scripting / scriptResourceHandler'섹션이 정의되어 있습니다.
문제가되는 행을 주석 처리해도 도움이되지 않았습니다. 내가해야하거나보아야 할 것에 대한 조언이 있습니까?
.net 4.0에서 실행되는 응용 프로그램 풀이있는 IIS에 배포하려는 경우 .net 3.5를 가리키는 모든 섹션이 포함 된 web.config를 정리해야합니다. 실패한 이유는 이러한 섹션 정의가 모든 시스템을 포함하는 .NET 4.0의 루트 web.config (% windir % \ microsoft.net \ framework \ v4.0.30319 \ config \ machine.config 참조)에 이미 포함되어 있기 때문입니다. 이미 선언 된 web.extensions
또 다른 빠른 수정 방법은 개발 시스템에있는 것처럼 응용 프로그램 풀을 2.0으로 설정하는 것입니다.
나와 같이 v4를 타겟팅해야하지만 .net 3.5로만 빌드 할 수있는 경우 여기 의 지침을 따르십시오 . web.config에서 <configSections>
with 의 전체 내용을 바꾸십시오 .
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
나를위한 해결책은 응용 프로그램 풀의 .NET 프레임 워크 버전을 기본 응용 프로그램 풀의 v4.0에서 v2.0으로 변경하는 것이 었습니다.
.net 4.0 결함에 대한 문제 해결 방법 : Solicon : 관리자 IIS 서버에 대한 변경 사항 establecer valores de grupos de aplicaciones를 입력하십시오! [여기에 이미지 설명 입력] [1] y cambiar la vercion del framework! [이미지 설명 입력] 여기] [2]
중앙 관리 2010 중앙 관리 시스템 문제 해결
----- Google 번역을 통해 -----
문제는 풀이 기본값이기 때문입니다. Net 4.0 솔루션 : 서버 IIS 관리자로 들어가서 응용 프로그램 풀의 오른쪽에 값을 설정하십시오! [여기에 이미지 설명 입력] [1] 및 프레임 워크 버전 변경! [여기에 이미지 설명 입력] [2]
SharePoint 중앙 관리 2010 설치 문제를 해결해야합니다.
응용 프로그램 풀을 2.0으로 설정했습니다.
괴롭힘.
web.config에 system.web.extensions 구성 섹션 또는 처리기 / 모듈 항목이없는 경우이 문제는 숨겨져있는 동안 다른 사람이 VisualStudio-Project (2013/2015/2017) 를 복사했기 때문에 발생합니다. -숨겨지지 않은 파일 .
그 때문에 .git뿐만 아니라 존재하지 않는 경로 (또는 더 나쁜 경로는 존재하지만 더 나쁜 경로에서는 web.config 파일을 가리키는.VS
IIS-Express applicationhost.config 파일 이 들어있는 .git도 복사 합니다) 같은 내용이 없습니다) ...
해결 방법 :
.VS 폴더에서 applicationhost.config 파일을 삭제하십시오.
또는 .VS 폴더를 모두 삭제하십시오.
Visual Studio에서 다시 만듭니다.
My app was an ASP.Net3.5 app (using version 2 of the framework). When ASP.Net3.5 apps got created Visual Studio automatically added scriptResourceHandler to the web.config. Later versions of .Net put this into the machine.config. If you run your ASP.Net 3.5 app using the version 4 app pool (depending on install order this is the default app pool), you will get this error.
When I moved to using the version 2.0 app pool. The error went away. I then had to deal with the error when serving WCF .svc :
HTTP Error 404.17 - Not Found The requested content appears to be script and will not be served by the static file handler
After some investigation, it seems that I needed to register the WCF handler. using the following steps:
- open Visual Studio Command Prompt (as administrator)
- navigate to "C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation"
- Run servicemodelreg -i
Apparently, other have (had) this problem. They rebuild in Framework 4.0. Can you?
Also, see this about making sure your IIS is fresh.
In my case it happened after I converted the whole solution (using an extension called Target Framework Migrator) to 4.6.2 but ended up undoing the changes and going back to 3.5 (solution is versioned by TFS). To solve this, I converted just the problematic project (which was using IIS Express to run) to 4.6.2 and then back to 3.5.
Another way to avoid this problem that may help others is build your .net web service to version 4.0 or higher if possible.
In my case I had 2 different apps sharing the same app pool. The first one was using the .net4.5 framwork and the new one was using 2.0. When I changed the second app to it's own app pool it starting working fine with no changes to the web.config.
My resolution was kind of stupid.
I installed a copy of .net 3.5
Created another app pool and selected .net 3.5 (it says 2.0.5077 in the drop down)
Added my website to that app pool
Recycled the old and new pools and the site started working.
It came down to me not having 3.5 installed even though the turn on windows features said I did and creating another app pool to use. I hope this helps others.
In my case I wanted to manually add urlrewrite rule and couldn't see the obvious error (I missed <rules>
tag):
wrong code:
<rewrite>
<rule name="some rule" stopProcessing="true">
<match url="some-pattenr/(.*)" />
<action type="Redirect" url="/some-ne-pattenr/{R:1}" />
</rule>
</rewrite>
</system.webServer>
</configuration>
proper code (with rules tag):
<rewrite>
<rules>
<rule name="some rule" stopProcessing="true">
<match url="some-pattenr/(.*)" />
<action type="Redirect" url="/some-ne-pattenr/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
I've solved it, doing the following steps:
- I created a new application's group in IIS.
- Open advanced settings for the site or web application that is having this problem.
- And set the new application's group.
Here you have the images of these steps:
This error message seems to come up in various situations.
In my case, on top of my application's Web.Config file I had an extra Web.Config file in the root folder (C:\Inetpub\www.root). Probably left there after some testing, I had forgotten all about it, and couldn't figure out what the problem was.
Removing it solved the problem for me.
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.
내 문제는 실수로 applicationhost.config 를 TFS에 커밋한다는 것 입니다. 나중에 최신 커밋을 얻은 후 랩톱에서 프로젝트를 실행하려고했을 때. 그때 오류가 발생했습니다.
가상 디렉터리 경로가 잘못되었음을 알았습니다.
<virtualDirectory path="/" physicalPath="C:\Users\giddan\Documents\Visual Studio 2015\Projects\ProjectName\DeV.ProjectName\DeV.ProjectName.Web" />
이것이 누군가를 돕기를 바랍니다!
이것은 내 첫 번째 게시물이므로 부드럽게하십시오 :)
'Programing' 카테고리의 다른 글
현재 줄에서 파일 끝까지 모든 텍스트를 VIM에서 어떻게 삭제할 수 있습니까? (0) | 2020.05.07 |
---|---|
Django Model 객체를 변환하여 모든 필드를 그대로 유지하십시오. (0) | 2020.05.07 |
원래 파일로 로컬 파일을 강제로 덮어 씁니까? (0) | 2020.05.07 |
JavaScript에서 외부 로컬 JSON 파일을 읽는 방법은 무엇입니까? (0) | 2020.05.07 |
jQuery-요소가 DOM에서 제거 될 때 이벤트 트리거 (0) | 2020.05.07 |