programing

VS 2012에서 사용자 지정 바인딩 호스트가 있는 IIS를 사용하는 프로젝트를 로드할 수 없습니다. IIS Express를 사용하고 있다고 생각합니다.

cafebook 2023. 6. 27. 23:38
반응형

VS 2012에서 사용자 지정 바인딩 호스트가 있는 IIS를 사용하는 프로젝트를 로드할 수 없습니다. IIS Express를 사용하고 있다고 생각합니다.

IIS를 사용하는 ASP.NET 프로젝트가 있습니다.IIS 사이트가 사용자 지정 바인딩 호스트 이름을 사용하도록 구성되었습니다.프로젝트 파일에 다음 설정이 포함되어 있습니다.

...
<UseIISExpress>false</UseIISExpress>
...
<ProjectExtensions>
  <VisualStudio>
    <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
      <WebProjectProperties>
        <UseIIS>True</UseIIS>
        <AutoAssignPort>False</AutoAssignPort>
        <DevelopmentServerPort>8662</DevelopmentServerPort>
        <DevelopmentServerVPath>/</DevelopmentServerVPath>
        <IISUrl>http://custom.host.name/</IISUrl>
        <NTLMAuthentication>False</NTLMAuthentication>
        <UseCustomServer>False</UseCustomServer>
        <CustomServerUrl></CustomServerUrl>
        <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
      </WebProjectProperties>
    </FlavorProperties>
  </VisualStudio>
</ProjectExtensions>
...

프로젝트가 이러한 방식으로 구성되면 다음 사이트에서 액세스할 수 있습니다.http://custom.host.name/및 VS는 디버깅 시 IIS 작업자 프로세스에 자동으로 연결됩니다.

프로젝트를 다시 로드할 때(솔루션을 닫거나 다시 열거나 프로젝트 상황에 맞는 메뉴에서 언로드/재로드) 예상치 못한 일이 발생합니다.프로젝트를 로드하지 못했습니다.(load failed)솔루션 탐색기의 프로젝트 이름 오른쪽에 표시되고 메시지 상자에 다음 메시지가 표시됩니다(출력 창에도 표시됨).

The URL 'http://custom.host.name/' for Web project 'Some.Asp.Net.Project' 
is configured to use IIS Express as the web server but the URL is currently
configured on the local IIS web server. To open this project, you must use
IIS Manager to remove the bindings using this URL from the local IIS web server.

IIS Express에서 프로젝트 사이트 구성을 제거하려고 시도했습니다.applicationhost.config파일, 하지만 도움이 되지 않았습니다.

기본 사이트에서 IIS 응용 프로그램에 프로젝트를 매핑할 때 이 문제가 발생하지 않습니다.

VS 버전은 Ultimate 2012 업데이트 3입니다.

관리자로 열어도 문제가 해결되지 않았습니다.저를 위해 그것을 고친 것은 두 개의 을 여는 것이었습니다..csproj그리고..csproj.user파일 및 두 파일 모두가 가지고 있는지 확인합니다.UseIISExpress로 설정한.false.

저 같은 경우에는..csproj.user파일이 파일을 재정의하고 있습니다..csproj파일을 작성합니다만SaveServerSettingsInUserFile표시되었습니다.false.

<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <UseIISExpress>false</UseIISExpress> 
    <!-- ... -->
</Project>

해결책: 삭제*.csproj.user줄 서!

"서버 설정 저장"을 설정했습니다."In UserFile"이 True로 표시되어 저에게 효과가 있었습니다.

<ProjectExtensions>
<VisualStudio>
  <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
    <WebProjectProperties>
      <UseIIS>True</UseIIS>
      <AutoAssignPort>True</AutoAssignPort>
      <DevelopmentServerPort>50584</DevelopmentServerPort>
      <DevelopmentServerVPath>/</DevelopmentServerVPath>
      <IISUrl>http://localhost:50584/</IISUrl>
      <NTLMAuthentication>False</NTLMAuthentication>
      <UseCustomServer>False</UseCustomServer>
      <CustomServerUrl>
      </CustomServerUrl>
      <SaveServerSettingsInUserFile>True</SaveServerSettingsInUserFile>
    </WebProjectProperties>
  </FlavorProperties>
</VisualStudio>

원본: 여기를 클릭합니다.

enable use for IISexpress를 사용하면 applicationHost가 됩니다.구성(%userprofile%\iispress\config에 있음)은 Project.csproj.user에 기록된 설정을 방지하려면 "모든 사용자에게 서버 설정 적용(프로젝트 파일에 저장)" 옵션을 선택해야 합니다.project settings

이것을 하는 것은 당신의 프로젝트를 편집하는 것과 같습니다. sysroj 파일과 쓰기.<WebProjectProperties> <UseIIS>True</UseIIS> <AutoAssignPort>True</AutoAssignPort> <DevelopmentServerPort>62242</DevelopmentServerPort> <DevelopmentServerVPath>/</DevelopmentServerVPath> <IISUrl>http://localhost:8100/Claims/</IISUrl> <OverrideIISAppRootUrl>True</OverrideIISAppRootUrl> <IISAppRootUrl>http://localhost:8100/Claims/</IISAppRootUrl> <NTLMAuthentication>False</NTLMAuthentication> <UseCustomServer>False</UseCustomServer> <CustomServerUrl></CustomServerUrl> <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile> </WebProjectProperties>IISpress를 활성화했는데 applicationHost.config 파일에 프로젝트 설정과 관련된 항목이 없으면 "Create Virtual Directory(가상 디렉토리 생성)" 버튼을 누르고 완료하면 됩니다.

이것이 도움이 되길 바랍니다.

저의 경우 *.csproj.user 파일을 삭제하면 정상적으로 작동했습니다.

저도 같은 문제가 있었습니다. 저는 관리자로서 비주얼 스튜디오를 열기만 하면 되었고, 이것으로 문제가 해결되었습니다.

따라서 Visual Studio 2012를 마우스 오른쪽 버튼으로 클릭하고 "관리자 권한으로 실행"을 클릭합니다.이것이 도움이 되길 바랍니다.

Windows 7 64비트가 설치된 Visual Studio 2015 Preview에서 두 가지 기능을 모두 사용할 수 있습니다.
delete *. 및 *.vmsroj.user 파일을 합니다.
2. <UseIISExpress>false</UseIISExpress>솔루션 파일에 있습니다.
22 :Visual Studio에서 Project==> Unload ===> 솔루션 편집을 마우스 오른쪽 버튼으로 클릭합니다.

이 정도면 충분합니다

프로젝트 파일 x.csproj에서 이 줄에 주석을 달습니다.

<!--<UseIIS>True</UseIIS>-->

x.csproj : error : 웹 프로젝트 'x'의 URL 'http://localhost/x'가 IIS Express를 웹 서버로 사용하도록 구성되었지만 현재 로컬 IIS 웹 서버에 구성되어 있습니다.이 프로젝트를 열려면 IIS 관리자를 사용하여 로컬 IIS 웹 서버에서 이 URL을 사용하여 바인딩을 제거해야 합니다.

IIS를 사용하도록 구성된 프로젝트가 웹 사이트(myproject.mycompany.local)를 찾을 수 없어 로드되지 않을 때 웹 사이트가 웹 브라우저에 정상적으로 로드되었음에도 불구하고 여기에 도착했습니다.

해결책은 IIS 7의 사이트 바인딩에서 호스트 이름이 "myproject.mycompany.local"로 설정되었는지 확인하는 것이었습니다.사이트의 바인딩에 액세스하려면:

  1. IIS 7의 왼쪽 탐색 패널에서 사이트를 선택합니다.
  2. 오른쪽의 작업 패널에서 바인딩...클릭합니다.

사이트가 웹 브라우저에도 로드되지 않는 경우 호스트 파일에 해당 항목이 없기 때문일 수 있습니다.

127.0.0.1    myproject.mycompany.local

프로젝트가 솔루션의 일부인 경우 솔루션 파일(.sln)을 열고 프로젝트 섹션을 편집합니다.

ProjectSection(WebsiteProperties) = preProject
    UseIISExpress = "false"

그것은 나에게 효과가 있었다.

이 문제가 오늘 VS 2013에서의 저의 하루를 망치고 있었습니다.위의 모든 것을 시도했지만 IIS에서 웹 사이트를 만들고 .csproj 파일(특히 IISUrl 요소)의 이 섹션을 채울 때까지 프로젝트가 로드되지 않았습니다.

<ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
        <WebProjectProperties>
          <UseIIS>True</UseIIS>
          <AutoAssignPort>True</AutoAssignPort>
          <DevelopmentServerPort>81</DevelopmentServerPort>
          <DevelopmentServerVPath>/</DevelopmentServerVPath>
          <IISUrl>http://localhost/SomeProject</IISUrl>
          <NTLMAuthentication>False</NTLMAuthentication>
          <UseCustomServer>False</UseCustomServer>
          <CustomServerUrl>
          </CustomServerUrl>
          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
        </WebProjectProperties>
      </FlavorProperties>
    </VisualStudio>

저도 같은 문제가 있었습니다. 관리자로 실행하는 것은 저에게 적합하지 않았습니다.

<UseIIS>True</UseIIS>프로젝트의 ".csproj" 파일에서 false로 임시 로드할 수 있지만 솔루션을 다시 시작하거나 닫은 후 값이 True로 반환되었습니다.

좀 더 답변을 가 있음에 더 . setting @Cyrus @Cyrus @Cyrus @Csproj.user 파일의 csproj.us 파일:<UseIISExpress>true</UseIISExpress>false는 csproj파일을 양호하게 합니다. csproj.user 파일을 삭제하지 않고 같은 를 제공합니다.결과는 다음과 같습니다.

<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <ProjectView>ProjectFiles</ProjectView>
    <UseIISExpress>false</UseIISExpress>
    <IISExpressSSLPort />
    <IISExpressAnonymousAuthentication />
    <IISExpressWindowsAuthentication />
    <IISExpressUseClassicPipelineMode />
    <NameOfLastUsedPublishProfile>My Project's Name</NameOfLastUsedPublishProfile>
  </PropertyGroup>

언급URL : https://stackoverflow.com/questions/17657607/vs-2012-cant-load-project-which-uses-iis-with-custom-binding-host-thinks-its

반응형