.Deploy extension not being downloaded using Static Compression RSS

1 reply

Last post Nov 03, 2015 04:47 PM by astengel

  • .Deploy extension not being downloaded using Static Compression

    Oct 21, 2015 04:27 PM|astengel|LINK

    I have a ClickOnce folder that I am trying to get to work in IIS, using static compression. I am running IIS 7 (Windows Server 2008 R2) and have enabled static compression. In Visual Studio 2010, the project built out all files as expected with the  .deploy extension. When I click directly on the .application file, the app installs with no issues. When I remove from the project, the .deploy file described in the error message, then another .deploy file is then the problem after I run through the deploy/install process again. So this issue is not about any one particular file.

    Using that same server, when I set up that same application folder as a website in IIS (.net 4 classic, static compression enabled), the publish.html file loads in the browser and then we see the Application Install Window.  After pressing the Install button, we get an error. Looking at the error Details, we see:

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    ERROR SUMMARY
     Below is a summary of the errors, details of these errors are listed later in the log.
     * Activation of http://localhost/K2ClickOnce/K2.application resulted in exception. Following failure messages were detected:
      + Downloading http://pws/k2ClickOnce/Application Files/K2/bin/Debug/info.lundin.math.dll.deploy did not succeed.
      + The remote server returned an error: (404) Not Found.

    ERROR DETAILS
     Following errors were detected during this operation.
     * [10/21/2015 3:51:45 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
      - Downloading http://hai-usah1-pws02/k2ClickOnce/Application Files/K2_2_0_0_39/bin/Debug/info.lundin.math.dll.deploy did not succeed.
      - Source: System.Deployment
      - Stack trace:
       at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
       at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
       at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
       at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
       at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
       at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
       at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
       at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
      --- Inner Exception ---
      System.Net.WebException
      - The remote server returned an error: (404) Not Found.
      - Source: System
      - Stack trace:
       at System.Net.HttpWebRequest.GetResponse()
       at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)

    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    The folder hosting the files gives full permissions to IIS_IUSR account. I have explicitly assigned the mime types and assigned those types static types. I've also used the Handler Mapping module to map them.

    Here's a snapshot of the areas of interest in ApplicationHost file:

     <staticContent lockAttributes="isDocFooterFileName">

                  <mimeMap fileExtension=".deploy" mimeType="application/octet-stream" />

                  <mimeMap fileExtension=".application" mimeType="application/x-ms-application" />

                  <mimeMap fileExtension=".manifest" mimeType="application/x-ms-manifest" />

    //////////

    <urlCompression doStaticCompression="true" doDynamicCompression="false" />

    //////////

    <handlers accessPolicy="Read, Script">
                    <add name="Config Files" path="*.config" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
                    <add name="ClickOnce3" path="*.application" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
                    <add name="ClickOnce2" path="*.deploy" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
                    <add name="ClickOnce1" path="*.manifest" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness32" />

    //////////////

    <handlers accessPolicy="Read, Script">
                    <add name="Config Files" path="*.config" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
                    <add name="ClickOnce3" path="*.application" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
                    <add name="ClickOnce2" path="*.deploy" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
                    <add name="ClickOnce1" path="*.manifest" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness32" />

    /////////////////

    <requestFiltering>
                    <fileExtensions allowUnlisted="true" applyToWebDAV="true">

    /////////////////

    <httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files" maxDiskSpaceUsage="200" minFileSizeForComp="256">
                <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
                <dynamicTypes>
                    <add mimeType="text/*" enabled="true" />
                    <add mimeType="message/*" enabled="true" />
                    <add mimeType="application/x-javascript" enabled="true" />
                    <add mimeType="*/*" enabled="false" />
                </dynamicTypes>
                <staticTypes>
                    <add mimeType="text/*" enabled="true" />
                    <add mimeType="message/*" enabled="true" />
                    <add mimeType="application/x-javascript" enabled="true" />
                    <add mimeType="application/atom+xml" enabled="true" />
                    <add mimeType="application/xaml+xml" enabled="true" />
                    <add mimeType="*/*" enabled="true" />
                    <add mimeType="application/x-msdownload" enabled="true" />
                    <add mimeType="application/octet-stream" enabled="true" />
                </staticTypes>
            </httpCompression>

    ///////////////////////////////////////////////////////////////

     

    Any help would be greatly appreciated!

     

  • Re: .Deploy extension not being downloaded using Static Compression

    Nov 03, 2015 04:47 PM|astengel|LINK

    Fixed.  In addition to all the standard advice one finds in the forums for Clickonce static compression (enable static compression, add .deploy, .manifest, .config, .application to Mime Types, mapper handlers & Static Types, setting FrequentHitThreshold="1", etc.), We discovered these issues.  1) In Visual Studio 2010, we needed to make sure that we had a URL filled in for the Installation Folder URL field on the Publish tab, regardless of whether or not it is the same as the UNC path described in the Publishing Folder Location. **2)Our ClickOnce application had files that needed to be compressed within its Bin folder. I had to remove "bin" from the list of the website's Request Filtering>>Hidden Segments.**  3)  In Server manager>>Web Server role services, we had to make sure that IIS 6 Management Compatability was installed and then run CSCRIPT.EXE ADSUTIL.VBS SET W3Svc/Filters/Compression/GZIP/HcFileExtensions "htm" "html" "txt" "doc" "ppt" "xls" "application" "manifest" "deploy" "exe" "dll".  Then restart the entire server.