인식 할 수없는 속성 'targetFramework'. 속성 이름은 대소 문자를 구분합니다.
내 사이트를로드하려고하는데이 오류 메시지가 나타납니다.
인식 할 수없는 속성 'targetFramework'. 속성 이름은 대소 문자를 구분합니다.
<compilation debug="true" targetFramework="4.0">
이 사이트는 로컬 PC에서 제대로 작동하지만 호스트에로드하여 온라인으로 보려고 할 때 열리지 않습니다.
이는 일반적으로 targetFramework="4.0"
web.config에 속성이 있지만 앱 풀이 ASP.NET 2.0을 실행하도록 설정된 경우에 발생합니다. 이 targetFramework
특성은 ASP.NET 2.0에서 완전히 인식되지 않으므로 2.0으로 변경해도 원하는 효과가 없습니다.
지원 / 관리자에게 문의하여 AppPool을 4.0으로 전환하십시오.
속성을 완전히 제거 할 수도 있지만 사이트가 4.0 프레임 워크로 코딩 된 경우 다른 오류도 발생할 수 있습니다.
IIS에 프레임 워크를 등록하면 나에게 효과적입니다.
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -i
IIS (열기 inetmgr 입력)를 열고 응용 프로그램 풀 설정을 변경하십시오.이 이미지를 크게 보려면 이미지를 마우스 오른쪽 단추로 클릭하고 새 탭에서 이미지를여십시오.
IIS에서
응용 프로그램 풀을 클릭하십시오
DefaultAppPool을 마우스 오른쪽 버튼으로 클릭 --- >> 응용 프로그램 풀 기본값 설정 ...--- >>. Net 버전을 V 4.0으로 변경합니다.
Visual Studio 메뉴에서 :
웹 사이트-> 시작 옵션-> 빌드 탭-> 드롭 다운 상자에서 대상 프레임 워크 선택 (.NET FrameWork 4)
첫 번째 웹 서비스를 게시하는 동안 동일한 문제에 직면했습니다. 나는 이것을 간단히함으로써 해결했다.
IIS 열기
응용 프로그램 풀을 클릭하십시오
DefaultAppPool => Set Application Pool Default => .Net Version을 V 4.0으로 변경하십시오. (응용 프로그램의 .Net Framework 버전을 구체적으로 변경할 수도 있습니다)
희망, 작동합니다.
Windows Server 2008 R2에서 ASP.Net을 해결하려면 IIS에 ASP.Net을 등록해야했습니다. 아래에 새겨진 명령의 재연
cd /d C:\Windows\Microsoft.NET\Framework\v4.0.30319
iisreset /stop
aspnet_regiis -i
iisreset /start
%systemroot%\system32\inetsrv\appcmd set config /section:isapiCgiRestriction /[path='%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll'].allowed:True
%systemroot%\system32\inetsrv\appcmd set config /section:isapiCgiRestriction /[path='%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll'].allowed:True
IIS 7의 경우 주어진 그림에 따라 시도해보십시오 ... 그것이 도움이된다면 저에게 도움이됩니다.
classic 대신 대상 프레임 워크 4.0으로 응용 프로그램 풀을 변경하십시오.
- RC 웹 사이트-> 웹 사이트 관리-> 고급 설정>
- 첫 번째 옵션은 클래식에서 프레임 워크 4 통합으로 변경되었습니다.
프로젝트 열기 -> 보도 Shift + F4 (오픈 속성 페이지) -> 선택했다 빌드 ->에서 대상 프레임 워크 선택 .NET 프레임 워크 4 OK>를 -
IIS가 아닌 IIS Express를 사용하고 있습니다.
문제는 {solution_folder} \. vs \ config \ applicationhost.config에있는 applicationhost.config 파일에 있습니다.
응용 프로그램 풀 항목 중 하나의 managedRuntimeVersion 값은 "v2.0"입니다. "v4.0"으로 변경했는데 제대로 작동했습니다.
근본 원인이 최근에 설치 한 NuGet 패키지 중 하나라고 확신합니다.
<system.applicationHost>
<applicationPools>
<add name="BadAppPool1" managedRuntimeVersion="v2.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
</applicationPools>
</system.applicationHost>
.Net Framework v4.0.3xxxxx를 선택하여 새 풀을 만듭니다.
파이프 라인 관리 모드 사용 : 통합
사이트에 할당하고 완료하십시오.
이 문제를 해결하려면 제어판의 사이트 도구 섹션에서 ASP.NET 버전 아이콘을 클릭하여 프레임 워크를 4.0으로 전환하십시오.
이전 버전의 VS에서 VS2010 및 .NET 4.0으로 변환 된 프로젝트 파일에서 실패한 MSBuild 컴파일 에서이 오류가 발생했습니다 . 실제로 웹 배포 프로젝트 였고 저에게 효과적 인 솔루션 은 MSBuild 파일 시작시 PropertyGroup 섹션에 다음 항목을 추가하는 것입니다 .
<ProductVersion>10.0.11107</ProductVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
VS2010에서 다른 유형의 프로젝트를 변환하면 자동으로 업데이트되지만 변환 후 내 웹 배포 프로젝트 파일에서 누락되었을 수 있습니다.
내가 한 일 : Application Pool의 값을 이전 값에서 DefaultAppPool로 변경했습니다. 고급 설정 (웹 사이트-> 웹 사이트 관리-> 고급 설정>에서이 작업을 수행합니다.
VS 2010 에서이 기능을 사용했습니다.
Fixed by editing the .sln file and changing the TargetFrameworkMoniker to have the value ".NETFramework,Version%3Dv4.0" assigned to it.
I also got the same issue while running my application locally which is pointing to .Net Framework 4.7.1. The bug was "Unrecognized attribute TargetFrameWork" as shown below.
But none of the above answers helped me. At last when I changed my present port (1413) number to some other value(60179) as shown below it worked fine for me.But I am not sure for the actual reason behind this , but it worked.
If you compile the files and the value of the "targetFramework" is set as being a particular version i.e. 4.0,
Make sure the host is running .net framework as the same version stated.
If not, download the .net framework.
After downloading, if it is not automatic being set in the IIS manager to be using the extension of the newly downloaded version of .net framework,
add the extension manually by going to the folder of the recently downloaded .net framework THROUGH IIS manager:
1.right-click website folder
2.go to "Properties"
3.under "virtual directory" , click "configuration"
4.edit the executable path of extension ".aspx" (of which the path being pointed to version other than the version of the recently downloaded .net framework) to the correct path which is the folder of the NEWLY downloaded version of .net framework and then select the "aspnet_isapi.dll" file.
5.click ok!
Just Remove the "Target Framework 4.0" and close the bracket.
It will Work
Follow these two steps:
Register the .net framework version version 4.0 (if it is not registered)
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -i
In the app pool change the .net framework to v4.0
If you install the IIS after the installation of .Net FrameWork. You need install the .net framework again for IIS. So all we need to do is run aspnet_regiis -i
. Hope it is helpful.
Saw the error "Unrecognized attribute 'targetFramework'" in the 'Console output' page of Jenkins on a build server. This was after I changed the 'target framework' for several projects from '.NET Framework 3.5' to '.NET Framework 4' and committed my changes.
In Jenkins the project settings had to be changed. For the solution the 'MSBuild Version' had to be changed from 'v3.5' to 'v4.0'.
Just had this issue deploying a new app to an old IIS box. The investigation led to the v4.5.1 run-time being installed but the app requiring v4.5.2
Nothing apart from installing the correct version of ASP .Net run-time was required.
It could be that you have your own MSBUILD proj file and are using the <AspNetCompiler>
task. In which case you should add the ToolPath
for .NET4.
<AspNetCompiler
VirtualPath="/MyFacade"
PhysicalPath="$(MSBuildProjectDirectory)\MyFacade\"
TargetPath="$(MSBuildProjectDirectory)\Release\MyFacade"
Updateable="true"
Force="true"
Debug="false"
Clean="true"
ToolPath="C:\Windows\Microsoft.NET\Framework\v4.0.30319\">
</AspNetCompiler>
For layering, Just change the version of targetFramework in web.config file only, the other things no need change.
I had the same issue and I found this nice poweshell script to update all of your app pools at the same time: https://gallery.technet.microsoft.com/scriptcenter/How-to-set-the-IIS-9c295a20
Make sure to set you $IISAppPoolDotNetVersion = "v4.0"
variable at the top.
following 2 steps will force refresh Visual Studio and IIS Express cache and usually resolve my similar issues:
- Simply switch Project framework from 4+ to .Net framework 3.5 and run it
- If it ran successfully you can revert it back to your desired 4+ target framework and see that it will probably work again.
dev PC에서 IIS를 실행하지 않는 사람이라면 여기에 나에게 일어난 일이 있습니다. 하나의 웹 사이트가 있었으며 이전의 웹 사이트는 3.5 인 반면 diff 웹 사이트의 파일로 덮어 썼습니다. 이 오류가 발생했습니다. dev PC에서 웹 사이트의 디렉토리 이름을 변경하여 간단히 고쳤습니다. 문제는 없습니다. 위의 내용은 아마도 더 우아 할 수도 있지만 때로는 간단한 작업 일 수도 있습니다. 즉, QA 또는 Prod가 아닌 dev에 있다면 해결할 수 있습니다.
'Programing' 카테고리의 다른 글
LaTeX 테이블에서 텍스트를 줄 바꿈하는 방법은 무엇입니까? (0) | 2020.02.21 |
---|---|
Json.net을 사용하여 json 객체를 동적 객체로 직렬화 해제 (0) | 2020.02.21 |
루비 블록에서 헤어지는 방법? (0) | 2020.02.21 |
'IIS APPPOOL \ ASP.NET v4.0'사용자의 로그인에 실패했습니다 (0) | 2020.02.21 |
request.GET에서 URL 매개 변수 캡처 (0) | 2020.02.21 |