Requirement
The bandwidth between the client and the server is small. In such an environment, the speed of downloading installation files from the client is improved.
Solution
ClickOnce supports "partial update ".
When ClickOnce is updated, the fingerprints of downloaded files in the "manifeset" file are automatically detected. Only those with different fingerprints can be downloaded from the server again.
Implement compressed download
Configure the file types supported by IIS Compression
In the "C: \ Inetpub \ AdminScripts" directory, create the batch processing file "configure the file types supported by IIS compression. bat" and run it. The content of the batch file is as follows:
[Plain]
Cd C: \ Inetpub \ AdminScripts
@ Echo start support for static and dynamic compression
Cscript adsutil. vbs set w3svc/filters/compression/parameters/HcDoDynamicCompression true
Cscript adsutil. vbs set w3svc/filters/compression/parameters/HcDoStaticCompression true
@ Echo: configure the types of static files supported by Compression
Cscript.exe adsutil. vbs set w3svc/Filters/Compression/GZIP/HcFileExtensions "htm" "html" "txt" "application" "manifest" "deploy" "exe" dll"
Cscript.exe adsutil. vbs set w3svc/Filters/Compression/DEFLATE/HcFileExtensions "htm" "html" "txt" "application" "manifest" "deploy" "exe" "dll"
@ Echo restart IIS
IISRESET. EXE
Enable IIS compression support options
Open Internet Information Service (IIS) manager ".
Expand the "local computer" node, right-click the "website" node, and select Properties to open the Properties dialog box.
Switch to the "services" tab and configure the "HTTP compression" area.
Select "compressing Application Files" and "compressing static files"
Make sure that the computer user "IIS_WPG" has the "read/write" permission on the temporary directory specified here.
Test
After accessing the Temporary directory (the default value is "C: \ WINDOWS \ IIS Temporary Compressed Files"), check whether the corresponding Compressed file is generated.
Only static files (html, txt, etc.) will be left with traces here, dynamic files (asp, dll, etc.) will not
Use fiddler to manually construct an HTTP request and check whether the RESPONSE header contains "Content-Encoding: gzip"
[Plain]
GET/clientes/ventas/Ventas_1_0_0_8/Ventas.exe. deploy HTTP/1.1
Accept :*/*
Accept-Language: es-ar
Accept-Encoding: gzip, deflate
Host: youhost.yourdomain.com
Connection: Keep-Alive
Unexpected
The "file types supported by compression configuration" step is not expected. File types such as "deploy" and "application" still cannot be compressed.
Open the file "C: \ WINDOWS \ system32 \ inetsrv \ MetaBase. xml" and find "HcFileExtensions". The two commands did not work.
Can I only cancel the "use 'ploy' extension" Release option in ClickOnce? NO, look at my tricks:
Run net stop iisadmin/y
Open the file "C: \ WINDOWS \ system32 \ inetsrv \ MetaBase. xml", find "HcFileExtensions", and manually add and save these file types.
Run iisreset
Remarks
It is found that compression is not enabled for the first access, and compression is enabled for the second access.
Reference
How ClickOnce Performs Application Updates
Using HTTP Compression for Faster Downloads (Microsoft IIS 6.0)
How to Enable ClickOnce Compression on IIS
Enabling HTTP Compression (IIS 6.0)
Author: iaki2008