Technics:CoPlanner Win-Client Installation by ClickOnce

From CoPlanner 10
Jump to navigationJump to search

It's possible to intall the CoPlanner Client by ClickOnce via Webserver (Microsoft Internet Information Services) or via deploying the required files. The big advantage of the ClickOnce installation is that after you have installed it once, changes can be rolled out automatically to the other clients. Principally deploying the required files is much easier because no webserver has to be configured.

Required files/folders

Requirements:

  • .Net Framework 4.8 has to be installed on computer of the Client. This means, that the computer requires .Net Framework on which CoPlanner Client should be installed via ClickOnce!
  • Local administrator rights are essential for the installation of .Net Framework!!!
Hint  ClickOnce cannot be used von Windows Terminal Server 2003 - 2008 R2.

A deployment packet consists of the following files:

  • Setup.exe
  • copstart_versionnumber.console
  • coplanner.htm
  • Copstart.console

A deployment packet contains the following directories:

  • coplanner_versionnumber
  • Client

All files or directories are Microsoft standard directories except for Client-Directory. The Client-Directory is CoPlanner specific. It contains customized files, which are downloaded after the Client-Installation, if CoPlanner is started.

Hint  Client-Directory MUST contain in deployment packet.

The following files have to exist in Client-Directory:

  • Attention - Version.txt is not allowed to set up manually on the Server, but with the tool CreateVersionAndChecksum.exe, which you only have to click doubly in data system of web folder.
  • Version.txt It contains a version number, which is checked at each start of the Client. At first start of the Client this file does still not exist. This means that at first start files are always downloaded. If you change after that something (ClientConfig.xml change of port), which should be allocated on all Clients, this number has to be increased. Thus files are updated automatically at next start of the Client.

Files in the Client-Directory have to have the same folder structure as in the Windows-Client. Would you like to allocate e.g. a customized start.html file, so it has to be located in directory ./Client/html/

Einstellungen IIS

If Deployment is provided via HTTP, you need therefore an IIS (Internet Information Server). Directory of Deployment has to be defined as „Standardwebsite“.

Einstellungen IIS 7

Einstellungen IIS 6

Error creating thumbnail: File missing
Technik, Einstellungen IIS

Webapplication Settings

The following properties are necessary to enable access to a Client:

  • Therefore click “Start” “Administrative Tools” “Internet Information Services (IIS) Manager”
  • Click on “local computer”, “websites” and then with the right mouse button on “a website” and choose “properties”, so you can have a look at the following windows:

To ScreenShot on the bottom right: remove .config from the list.

MIME Types im IIS

It can occur that not all files are copied onto the Client-computer at Deployment via IIS. In this case MIME Types have to be defined for appropriate files.

For definition of MIME Types please do it in the following way:

1. Open IIS Management Console
2. Right click on computer name and choose settings
3. Click on MIME Types


Error creating thumbnail: File missing
Technik, Eigenschaften von WAWISNEU1
4. Click on New
Error creating thumbnail: File missing
Technik, MIME - Typ

Definition: MIME Types should be defined for following extensions:

  • .config
  • .lic
  • .dat
  • .scc
  • .rdl
  • .rptproj
  • .suo

Definition: MIME Type „application/x-ms-manifest“:

  • .manifest

Type is here „application/x-ms-manifest.

An IIS Reset should be carried out after MIME Types are entered in. At the same time Webservice is restarted. For the new start you have to enter iisreset in command line.

Additonal settings if not all files are transferred

The „Frontpage Server extensions“ need tob e installed on the Server.

Additionaly the following entries in the file: %windir%\System32\inetsrv\config\applicationHost.config need tob e adapted:

<section name="customMetadata" allowDefinition="AppHostOnly" overrideModeDefault="Allow"/>
<add fileExtension=".config" allowed="True"/>
<section name="directoryBrowse" overrideModeDefault="Allow"/>
<section name="directoryBrowse" overrideModeDefault="Allow"/>

The root directory of the Click Once Deployment should contain a „web.config“ file with the following content:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
   <system.webServer>
      <directoryBrowse enabled="True"/>
      <staticContent>
         <mimeMap fileExtention=".user" mimeType="application/x-ms-application"/>
         <mimeMap fileExtention=".exe.config" mimeType="application/x-ms-application"/>
         <mimeMap fileExtention=".suo" mimeType="application/x-ms-application"/>
      </staticContent>
         <security>
            <requestFiltering>
               <fileExtensions allowUnlisted="True" applyToWebDAV="True"/>
            </requestFiltering>
         </security>
      <defaultDocument>
         <files>
               <add value="coplanner.htm"/>
         </files>
      </defaultDocument>
   </system.webServer>
</configuration>

Generally “hidden files” and “files with umlauts” cannot be transferred.


.config or exe… files are not transmitted

Remove the extension „.config“ in the properties of the IIS project. This can be done for all files, to be not transmitted.

Error creating thumbnail: File missing


Problems in Installation

If an error message appears after starting ClickOnce Setup with the following content (abstract at display of error details),

This can have two known reasons:

  • That user, who would like to carry out ClickOnce-Installation, does not have the right to read required files in that directory, which contains the Client-Setup. If an http-Server provides Deployment, you have to consider that the IIS-User (per default ISUER_[Servername]) has the right of reading on directories at activation of anonymous access. If the integrated NT-Authentication is active and an anonymous access is not allowable, the user, who carries out ClickOnce-Installation, has to have rights of reading on those directories.
  • A ClickOnce-Installation has been already carried out, but from another directory/Server. Although the previous version was correctly deinstalled about software overview of the system, directories in the NT-User-directory remain.

By this installation is interrupted due to errors.This problem can be solved in the following way: Directory C:\documents and settings\[NT-Username] \Local properties\Apps\2.0 contains those program files, which were installed via ClickOnce. To be able to find these directories, the option „Show hidden files and folders“ has to be activated in the windows explorer (Click on “Tools” [[Image:arrow.jpg]“Folder Option”). There are sub directories in this folder, which contains the ClickOnce program components as already mentioned. Therefore all sub folders of folder „C:\Documents and settings\[NT-Benutername] \Local settings\Apps\2.0\“ have to be deleted. After that you can start ClickOnce-Installation from the new Deploy Server/Directory again.


Problem with copstart.exe.manifest

If you start the installation, it is possible that a 404 – „Folder not found“ – error message can appear.

The following MIME-Type has to be defined (details look properties IIS):

Error creating thumbnail: File missing
Technik, MIME - Typ


Properties Share

For Deployment via Share you have to consider that the user has reading rights on Share.


Client Installation

It can happen that Internet Explorer can not download all files. In this case there is an error message in log file of Webserver: Copstart.console' was not be able to be downloaded. This problem is connected with properties of local Internet Explorer: You find properties to this under: Tools -> Internet Options -> Security (local Intranet) -> Custom level -> User-Authentication. The field „Prompt for user name and password“ has to be activated:

Error creating thumbnail: File missing


Optional Debugmode (since 2007-07-02)

There can be a lot of reasons, that diverse files are not transferred from Webserver to the Client. For this case an optional Debug-Informationwindow was implemented. It is not allowed to increase manually the Serverversion, but about command line CreateVersionAndChecksum.exe, which has to be clicked doubly in directory of Webserver (data system!).

That's how it goes then:

Error creating thumbnail: File missing
Technik, Optionaler Debugmode

This tool writes all files of Server and its size in folder Version.txt, which is transferred from CopRun at installation to Client. With this list the installation program checks availability and right size of each file of Server. If any files are not transferred successfully, a window appears and offers to enable the Debugmode. That's how it can go:

Error creating thumbnail: File missing
Technik, FFClickOnce

(Please note, that it is possible with both Add- on „FFClickOnce“ and Firefox-browser to carry out ClickOnce-Installations). The window offers the possibility to reset version number, so you can start the next attempt (e.g. after new configuration of IIS). It is not necessary to edit manually file Version.txt on Client due to version is set to 0 from installation program. Consequently, the whole transmission procedure is started again, if you click „Install“ on the website or at Performing by Start/Program Folders/CoPlanner Client. If errors are indifferent, you can choose „Ignore and close“ (so you can hope that the Client will work even so).

You also can activate Debugmode by checking the checkbox. In this case you have to reset the version number (otherwise Debugmode does not make sense). It is done in this Walkthrough and the version number is reset. With anew click on „Install“ on the website, the following window appears:

Error creating thumbnail: File missing
Technik, Debugmode

After clicking on „start Install “, it is started and information are written subsequently for transmission. You can have a look (at this example), why some files were not transferred and on this way you probably get on to the problem. If all problems are solved, you can switch off the Debugmode and continue your work.