본문 바로가기

카테고리 없음

asp.net core to Local IIS

window 10 OS에서 iis 웹서버를 서비스하려다 알게된

너무 당연한 내용이지만 처음엔 몰라 당황했던 사실들을 정리한다.

 

- IIS(Internet Information Server)란 인터넷 정보 서버(or 서비스) 라고 하며 윈도우 OS(window 7/8/10같은 클라이언트와 Window Server OS) 에서 지원하는 웹서버이다.

 

- IIS는 클라이언트 OS(Window 7/8/8.1/10)에서 지원하는 로컬 IIS 웹서버와 윈도우 서버OS(Window Server 2008/2012) 에서 제공하는 운영 IIS 웹서버로 나뉜다.(Visual Studio 에서 개발시 디버깅 용으로 제공하는 'IIS Express' 도 있긴하다.)

 

- Local IIS 사용 시 Microsoft 사이트에서 'Web Platform Instroller' 를 따로 설치 후 DB 서버/PHP 서버 기능을 추가적으로 사용 할 수 있는 것 같다.

 

- asp.net core 앱을 iis 에 서비스 할 때 In-Process 또는 Out-of-Process 모델로 호스팅 할 수 있는데 둘간의 차이는 하단과 같다.

  (Out-of-Process 호스팅을 위해 앱을 구성하려면 프로젝트 파일( .csproj)에서 <AspNetCoreHostingModel> 속성의 값을 OutOfProcess로 설정)

 

  In-Process : IIS HTTP 서버(CreateDefaultBuilder에서 UseIIS를 호출)사용 /

  Out-of-Process : Kestrel 서버를 사용(CreateDefaultBuilder에서 UseIISIntergration를 호출) 사용

 

- .net core 앱은 2가지 로 게시 될 수 있다.(self-contained/ framework-dependent)

  self-contained : exe 로 배포(specific platform / .net core 런타임이 앱에 포함 )

  framework-dependent : dll 로 배포(cross-platform / .net core 런타임 앱에 포함 X => Platform 에 해당하는 Hosting Bundle 설치    필요 / 지정하는 대상 플랫폼에 따른 실행 파일과 dll이 동시 생성=>RID 에 대상 플랫폼 지정 가능)

  => 참고(docs.microsoft.com/ko-kr/dotnet/core/deploying/)

 

- 개인적인 정리 :

asp.net 개발시 Publish 한 Local IIS 사이트 경로(the Physical path to the site in IIS Manager)에 Deploy 후 호스팅 할 경우에는 Framework Dependent(프레임워크 종속 배포: .dll)로 하고 'Hosting Bundle'을 따로 다운 받아야 한다.? => Hosting IIS 방법 도큐먼트 참조 (docs.microsoft.com/ko-kr/aspnet/core/host-and-deploy/iis/?view=aspnetcore-3.1#iis-configuration

혹은 self-contained로 게시 할 경우는 Hosting Bundle 불필요하단 말이겠지?

+ InProcess 가 자체 포함 배포? OutOfProcess가 프레임워크 종속 배포 라는 말인가? => asp.net core 모듈 설명 참조 (docs.microsoft.com/ko-kr/aspnet/core/host-and-deploy/aspnet-core-module?view=aspnetcore-3.1#hosting-models)

 

 

iis 에 ssl 추가 할 때 참고 할 것

(gostart.tistory.com/186)

(tothenextlevel.tistory.com/29?category=872339)

추후 iis 사이트 ip 구현 시 참고 할 것.

(studyforus.tistory.com/30)

추후 iis 사이트 파일 용량 증진 필요시 참고 할 것.

(studyforus.tistory.com/34)