상세 컨텐츠

본문 제목

ClickOnce IIS Setup

.Net Framework/.Net Framework 2.0

by 탑~! 2008. 4. 1. 10:17

본문

Installing applications using ClickOnce is much simpler than creating an MSI, but there are a couple of considerations when hosting a ClickOnce Publisher in IIS.


 

ClickOnce는 MSI보다 배포 프로젝트를 구성하는데 훨씬 쉬우나 ClickOnce를 IIS에 호스팅을 하기 위해서는 몇가지 고려해야 할 사항들이 있다.


 

This step-by-step guide addresses a couple issues with initial Publisher site setup.


 

아래는 단계별로 배포사이트를 구성함에 있어 몇가지 이슈에 대해 해결을 하고 있다.


 

1. Create a Virtual Directory.


 

가상 디렉토리 만들기


 

There are several new file extensions used in a ClickOnce installation which cannot be downloaded by IIS. The extensions need to be mapped to existing Mime Types.


 

ClickOnce 인스톨 과정에서 사용되어지는 몇가지 새로운 확장자가 있는데 이는 IIS에 의해서 다운로드 되지 않는다. 새로운 확장자를 기존의 Mime Type과 매핑을 시켜줘야 한다.


 

If there will be multiple applications hosted by the IIS server then you can create a base virtual directory so that the MIME mappings only need to be created once. Alternately you could create them at the root level however that would affect all applications on the server. If creating a base directory then disable anonymous access on it.


 

Right click on the directory and select Properties. From the Http Headers tab, select MimeTypes.


 

만일 IIS 서버에 여러가지 어플리케이션이션을 호스팅하고 있다면 먼저 기본 가상 디렉토리를 생성하고 MIME 매핑을 그때 한번만 해놓으면 된다. 물론 루트 레벨에 생성하여 서버에서 호스팅되는 모든 어플리케이션에 적용되도록 할 수도 있다. 만일 기본 가상 디렉토리를 만들었다면 가장먼저는 익명사용자 접속 부분을 해제시켜야 한다. 가상 디렉토리에서 오른쪽 마우스 클릭을 하여 속성을 선택한다. Http 헤더 탭에서 MimeType을 선택한다. 그리고 아래와 같이 한다.


 


  • Add the extensions “.application” and “.manifest” with Mime Type “application/x-ms-application”.
  • There are several other new extensions, such as “.deploy”. The rest can be globally mapped with extension “.*”, Mime Type “application/octet-stream”.
  • ".application"과 ".manifest" 확장자를 application/x-ms-application"에 추가를 시켜라.
  • ".deploy:와 같은 다른 새로운 확장자가 있는데, 다른 나머지 것들은 ".*" 부분을 "application/octet-stream" 에 매핑을 시켜라.


 

2. Publishing the application with Visual Studio.


 

Visual Studio로 어플리케이션 배포하기


 

ClickOnce downloads need to be signed with a trusted certificate.


 

ClickOnce는 trusted 인증서와 같이 다운로드 된다.


 

In Visual Studio from the Solution Explorer window, right-click on the Project and select Properties. Choose Select File to associate a certificate with the application.


 

Visual Studio 솔루션 탐색기에서, 프로젝트에서 마우스 오른쪽 버튼을 클릭하여 속성을 선택한다. File 탭을 선택하면 어플리케이션 인증과 관련된 부분을 볼 수 있다.


 

If using a well-known publisher such as Verisign, then any client should be able to download the signed application.


 

For other certificates such as a test certificate, a user running with low-privelege on the client machine would need to add it to the Trusted Root Certification Authorities group and the Trusted Publishers group before the first download. A user with adminstrator priveleges on the client would have the option of installing the certificate remotely the first time they download the signed application.


 

Verisign과 같이 잘 알려진 인증서의 경우 모든 클라이언트에서 인증된 어플리케이션을 다운로드 하여 사용할 수 있을 것이다. 테스트용 인증서를 포함한 다른 인증들에 대해서도 '낮은 등급의 사용자들도 신뢰할 수 있는 루트 인증서'와 '신뢰할 수 있는 공급자'에 추가시켜 사용해야 한다. 그렇게 되면 관리자를 포함하여 일반 사용자들은 인증서로 사인된 어플리케이션을 처음 다운로드 하기전에 인증서를 먼저 설치하게 될 것이다.


 

If the client has registered the certificate in the Trusted Root Authorities group but not in the Trusted Publishers group, they will be prompted upon the first install to add the Publisher to the Trusted Publishers group – no further prompting would occur for future downloads using this certificate.


 

만일 사용자가 '신뢰할 수 있는 루트 인증서'만 설치하고 '신뢰할 수 있는 공급자'에는 추가되어 있지 않다면 먼저 공급자를 '신뢰할 수 있는 공급자'에 추가시켜야 한다.


 

Once the certificate is registered in the Trusted Publisher’s group, all applications and revisions signed with the same certificate can be downloaded without being prompted with the scary 'untrusted publisher' message.


 

일단 인증서가 신뢰할 수 있는 공급자에 등록되었다면, 모든 어플리케이션이나 업데이트된 항목은 '신뢰할 수 없는 공급자' 메시지 같은 것을 받지 않을 것이며, 동일한 인증서를 사용하게 되어질 것이다.


 



 

To deploy:


 

Select Publish from the Build menu or right-click on the project in Solution Explorer and select Publish. The web page will display as it will be seen by clients, with an install button. That’s all!


 

You can customize the deployment from the Publish tab on the Properties Page.


 

적용 :


 

솔루션 탐색기에서 프로젝트의 속성창을 선택하여 공급자를 선택하라. 웹페이지는 사용자에게 보여지는 것과 같은 것으로 단지 인스톨 버튼만 있을 뿐이다. 이게 다다.


 

속성페이지에 있는 공급자탭에서 커스터마이징을 할 수 있다.


 

 


 

3. Customizing Deployment.


 

배포 커스터마이징


 

When the application is published with revisions, clients will be notified before application startup that a new version exists.


 

By default, they can skip updating the application (unless the developer changed the manifest to only install updates after the application is shut down rather than before start up).


 

어플리케이션 업버전이 만들어졌을 때, 사용자들에게는 신규 버전이 존재한다는 것을 프로그램 실행전에 알려야 할 것이다. 기본으로는 어플리케이션 업데이트를 실행하지 않는 것으로 되어 있을 것이다.(만일 그렇지 않다면 개발자는 프로그램이 시작하기전보다는 프로그램 종료후에 업데이트를 설치할 수 있도록 메니페스트를 바꿔야 할 것이다.)


 

If you want to enforce installation of new updates you can specify a minimum version number:


 

새로운 버전으로 강제 인스톨 시키고 싶다면 최소한의 버전을 설정해야 한다.:


 

Right-click on the project from Solution Explorer and select Properties.


 

솔루션 탐색기에서는 프로젝트의 속성을 선택한다.


 

Select Publish->Updates. Check the ‘specify a minimum required version…’ checkbox and enter the version number you want the user to install.


 

공급자->업데이트를 선택하라. '최소 요구 버전'을 체크하고 사용자가 인스톨해야 할 버전 번호를 입력하라.


 

ClickOnce will not download the entire application each time, only the updated files.


 

ClickOnce는 어플리케이션 전체를 다운로드 하지 않을 것이며, 오직 업데이트 된 파일만 다운로드 하게 될 것이다.


 



 

4. Rollbacks.


 

롤백


 

Users can rollback to the previous version from the Control Panel Add/Remove window.


 

사용자들은 제어판의 프로그램 추가 및 삭제에서 기존 버전을 삭제할 수 있다.


 

Updates marked mandatory (with a minimum version number) cannot be rolled back.


 

최소한의 필수 버전 번호등과 같은 것은 삭제되지 않는다.


출처 : http://community.rampgroup.com/blogs/ramp_technology_group/archive/2005/06/03/26.aspx

'.Net Framework > .Net Framework 2.0' 카테고리의 다른 글

DataSet SerializationFormat  (0) 2008.12.04
직렬화 제어  (0) 2008.04.18
직렬화 방법에 따른 크기 비교  (0) 2008.04.18
객체 직렬화  (0) 2008.04.18
.NET의 Enterprise Service(COM+) 이해  (0) 2008.04.04

관련글 더보기