Microsoft MVP성태의 닷넷 이야기
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

Visual Studio - Web Application을 실행하지 못하는 IISExpress

비주얼 스튜디오에서 ASP.NET 4.8 웹 애플리케이션을 F5 키로 실행했더니, 그냥 웹 브라우저가 하나 뜨고 이런 오류 메시지만 보입니다.

Hmmm… can't reach this page The connection was reset.
Try:

Running network diagnostics with Get Help
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_RESET

그 와중에 "Debug" 창에는 이런 식의 메시지가 나오는데요,

Verbose logs are written to:
%USERPROFILE%\AppData\Local\Temp\visualstudio-js-debugger.txt
Uncaught SyntaxError SyntaxError: Unexpected token 'export'
    at (program) (chrome-error://chromewebdata/:1847:1)
Uncaught SyntaxError SyntaxError: Cannot use import statement outside a module
    at (program) (chrome-error://chromewebdata/:1977:1)
Uncaught ReferenceError ReferenceError: loadTimeData is not defined
    at (program) (chromewebdata/(index)꞉2025:11:2289:31)

일단 IISExpress가 실행은 되었는데, 명령행으로 보면 딱히 문제가 없어 보입니다.

"C:\Program Files\IIS Express\iisexpress.exe"  /config:"C:\temp\TestWebApp\.vs\TestWebApp\config\applicationhost.config" /site:"TestWebApp" /apppool:"Clr4IntegratedAppPool"

혹시나 싶어 저 명령어를 콘솔에서 직접 실행했더니 이렇게 나옵니다.

C:\temp> "C:\Program Files\IIS Express\iisexpress.exe"  /config:"C:\temp\TestWebApp\.vs\TestWebApp\config\applicationhost.config" /site:"TestWebApp" /apppool:"Clr4IntegratedAppPool"
Starting IIS Express ...
Successfully registered URL "https://localhost:8000/" for site "TestWebApp" application "/"
Successfully registered URL "http://localhost:57089/" for site "TestWebApp" application "/"
Registration completed for site "TestWebApp"
IIS Express is running.
Enter 'Q' to stop IIS Express

아하~~~ 가만 보니까, https를 위해 8000, http를 위해 57089를 열고 있는데 실제로 csproj 프로젝트 파일에 저렇게 설정돼 있습니다.

...[생략]...

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

...[생략]...

그래서 프로젝트 속성 창을 통해 들어가 "Web" 범주의 "Servers"에서 "Project Url"을 "http://localhost:8000/"으로 변경 후 저장을 했더니 다음과 같이 묻는 창이 뜹니다.

The local IIS Express URL http://localhost:8000/ specified for Web project TestWebApp has not been configured. To keep these settings you need to configure the virtual directory. Would you like to create the virtual directory now?


OK 버튼을 누르면 이제부터 정상적으로 F5 디버깅이 잘 됩니다.




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]







[최초 등록일: ]
[최종 수정일: 1/15/2024]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




1  2  3  4  5  6  7  8  9  10  11  12  13  14  [15]  ...
NoWriterDateCnt.TitleFile(s)
13266정성태2/20/20234667오류 유형: 848. .NET Core/5+ - Process terminated. Couldn't find a valid ICU package installed on the system
13265정성태2/18/20234580.NET Framework: 2096. .NET Core/5+ - PublishSingleFile 유형에 대한 runtimeconfig.json 설정
13264정성태2/17/20236147스크립트: 45. 파이썬 - uvicorn 사용자 정의 Logger 작성
13263정성태2/16/20234302개발 환경 구성: 666. 최신 버전의 ilasm.exe/ildasm.exe 사용하는 방법
13262정성태2/15/20235348디버깅 기술: 191. dnSpy를 이용한 (소스 코드가 없는) 닷넷 응용 프로그램 디버깅 방법 [1]
13261정성태2/15/20234683Windows: 224. Visual Studio - 영문 폰트가 Fullwidth Latin Character로 바뀌는 문제
13260정성태2/14/20234479오류 유형: 847. ilasm.exe 컴파일 오류 - error : syntax error at token '-' in ... -inf
13259정성태2/14/20234598.NET Framework: 2095. C# - .NET5부터 도입된 CollectionsMarshal
13258정성태2/13/20234469오류 유형: 846. .NET Framework 4.8 Developer Pack 설치 실패 - 0x81f40001
13257정성태2/13/20234556.NET Framework: 2094. C# - Job에 Process 포함하는 방법 [1]파일 다운로드1
13256정성태2/10/20235321개발 환경 구성: 665. WSL 2의 네트워크 통신 방법 - 두 번째 이야기
13255정성태2/10/20234705오류 유형: 845. gihub - windows2022 이미지에서 .NET Framework 4.5.2 미만의 프로젝트에 대한 빌드 오류
13254정성태2/10/20234610Windows: 223. (WMI 쿼리를 위한) PowerShell 문자열 escape 처리
13253정성태2/9/20235454Windows: 222. C# - 다른 윈도우 프로그램이 실행되었음을 인식하는 방법파일 다운로드1
13252정성태2/9/20234228오류 유형: 844. ssh로 명령어 수행 시 멈춤 현상
13251정성태2/8/20234648스크립트: 44. 파이썬의 3가지 스레드 ID
13250정성태2/8/20236511오류 유형: 843. System.InvalidOperationException - Unable to configure HTTPS endpoint
13249정성태2/7/20235328오류 유형: 842. 리눅스 - You must wait longer to change your password
13248정성태2/7/20234280오류 유형: 841. 리눅스 - [사용자 계정] is not in the sudoers file. This incident will be reported.
13247정성태2/7/20235178VS.NET IDE: 180. Visual Studio - 닷넷 소스 코드 디버깅 중 "Decompile source code"가 동작하는 않는 문제
13246정성태2/6/20234357개발 환경 구성: 664. Hyper-V에 설치한 리눅스 VM의 VHD 크기 늘리는 방법 - 두 번째 이야기
13245정성태2/6/20234927.NET Framework: 2093. C# - PEM 파일을 이용한 RSA 개인키/공개키 설정 방법파일 다운로드1
13244정성태2/5/20234316VS.NET IDE: 179. Visual Studio - External Tools에 Shell 내장 명령어 등록
13243정성태2/5/20235137디버깅 기술: 190. windbg - Win32 API 호출 시점에 BP 거는 방법 [1]
13242정성태2/4/20234594디버깅 기술: 189. ASP.NET Web Application (.NET Framework) 프로젝트의 숨겨진 예외 - System.UnauthorizedAccessException
13241정성태2/3/20234034디버깅 기술: 188. ASP.NET Web Application (.NET Framework) 프로젝트의 숨겨진 예외 - System.IO.FileNotFoundException
1  2  3  4  5  6  7  8  9  10  11  12  13  14  [15]  ...