none
ClickOnce setup.exe fails with DeploymentDownloadException when installing from network share but the application link works (not using IIS)

    السؤال

  • If I use the ClickOnce application from the remote share it works fine but if I download and run setup.exe I get the error

    "Cannot download application. The Application is missing required files."

    after starting the setup.exe

    Clicking details gives the following info:

    PLATFORM VERSION INFO
      Windows       : 6.1.7601.65536 (Win32NT)
      Common Language Runtime   : 4.0.30319.237
      System.Deployment.dll    : 4.0.30319.1 (RTMRel.030319-0100)
      clr.dll       : 4.0.30319.237 (RTMGDR.030319-2300)
      dfdll.dll      : 4.0.30319.1 (RTMRel.030319-0100)
      dfshim.dll     : 4.0.31106.0 (Main.031106-0000)
    
    SOURCES
      Deployment url     : file:///C:/Users/srchamberlain/Downloads/ContractFlowTool.application
    
    ERROR SUMMARY
      Below is a summary of the errors, details of these errors are listed later in the log.
      * Activation of C:\Users\srchamberlain\Downloads\ContractFlowTool.application resulted in exception. Following failure messages were detected:
        + Downloading file:///C:/Users/srchamberlain/Downloads/ContractFlowTool.application did not succeed.
        + Could not find file 'C:\Users\srchamberlain\Downloads\ContractFlowTool.application'.
        + Could not find file 'C:\Users\srchamberlain\Downloads\ContractFlowTool.application'.
        + Could not find file 'C:\Users\srchamberlain\Downloads\ContractFlowTool.application'.
    
    COMPONENT STORE TRANSACTION FAILURE SUMMARY
      No transaction error was detected.
    
    WARNINGS
      There were no warnings during this operation.
    
    OPERATION PROGRESS STATUS
      * [8/16/2011 12:23:26 PM] : Activation of C:\Users\srchamberlain\Downloads\ContractFlowTool.application has started.
    
    ERROR DETAILS
      Following errors were detected during this operation.
      * [8/16/2011 12:23:26 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
        - Downloading file:///C:/Users/srchamberlain/Downloads/ContractFlowTool.application 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.DownloadManifestAsRawFile(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
          at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
          at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
          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
        - Could not find file 'C:\Users\srchamberlain\Downloads\ContractFlowTool.application'.
        - Source: System
        - Stack trace:
          at System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult)
          at System.Net.FileWebRequest.GetResponse()
          at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
        --- Inner Exception ---
        System.Net.WebException
        - Could not find file 'C:\Users\srchamberlain\Downloads\ContractFlowTool.application'.
        - Source: System
        - Stack trace:
          at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
          at System.Net.FileWebRequest.GetResponseCallback(Object state)
        --- Inner Exception ---
        System.IO.FileNotFoundException
        - Could not find file 'C:\Users\srchamberlain\Downloads\ContractFlowTool.application'.
        - Source: mscorlib
        - Stack trace:
          at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
          at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
          at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
          at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync)
          at System.Net.FileWebStream..ctor(FileWebRequest request, String path, FileMode mode, FileAccess access, FileShare sharing, Int32 length, Boolean async)
          at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
    
    COMPONENT STORE TRANSACTION DETAILS
      No transaction information is available.


    The root of the problem is it is trying to download it's files from the same path as setup.exe is run from (file:///C:/Users/srchamberlain/Downloads in this case) instead of the actual deployment url (\\fs1\contractflowtool)

    I have seen a few solutions but all of them tell me the solution is to change the MIME type on IIS. IIS is not installed on the server that is hosting the files.

    Does anyone have any ideas on what else can be done to fix this besides "change the MIME types" or can explain to me how that is possible to do on a server that does not have the IIS module installed?


    • تم التحرير بواسطة Scott R. Chamberlain 16/رمضان/1432 07:05 م Tried to fix formattting on code block
    16/رمضان/1432 07:04 م

الإجابات


  • This is my personal permissions and the global permissions given to everyone else in the company.

     

    I do not think this is a permissions issue because if you generate two identical setup.exe files, one with a unc path and one with a http path and you open both in a hex editor you can see the http path in the editor, however in the version with the unc path the source is nowhere to be found . I think it is a bug with ClickOnce, I have opened a bug ticket but have yet to get a response.


    • تم وضع علامة كإجابة بواسطة Neddy Ren 29/رمضان/1432 02:07 ص
    26/رمضان/1432 01:34 م

جميع الردود

  • Hi Scott R. Chamberlain,

    Welcome to the MSDN Forum.

    You can't download your published clickonce application straightly and install it. Because by using the Clickonce, the setup.exe is just a part of the file. When you install it remotely, the clickonce will load the *.manifest, *.application and other files. If you download the file, you will get exceptions like you've provided and some of the files will losed.

    On the other hand, if you want to download and install your application, you will need to use Deployment and create the setup project. In this way, the Visual Studio will help you and package all the dependent files in one package and you can download it and install it.

    Best Regards


    Neddy Ren [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    18/رمضان/1432 08:36 ص
  •  

    I do not understand your answer. Let me go through the steps for you, and you tell me where I am making a mistake.

    1. Under the project configuration in Publish I have:

    • \\fs1\contractflowtool\ set as the Publishing Folder Location
    • Install mode and settings is set to "The application is available offfline as well (launchable from the start menu)"
    • Publish options is set to create a deployment webpage

    2. I click Publish Now

    3. The project is built and a Publish.html, ContractFlowTool.application, and setup.exe is created at \\fs1\contractflowtool\Publish.html

     

    Here is where the list diverges:

    (installing using the publish.html from IE)

    4. New users of the software go to the site \\fs1\contractflowtool\Publish.html with their native browser (IE for the purpose of this example)

    5. The click the link and it immediately runs setup.exe

    6. setup.exe says verifying components.

    7. setup.exe gives the following error

    8. The error log says

    PLATFORM VERSION INFO
    	Windows 			: 6.1.7601.65536 (Win32NT)
    	Common Language Runtime 	: 4.0.30319.237
    	System.Deployment.dll 		: 4.0.30319.1 (RTMRel.030319-0100)
    	clr.dll 			: 4.0.30319.237 (RTMGDR.030319-2300)
    	dfdll.dll 			: 4.0.30319.1 (RTMRel.030319-0100)
    	dfshim.dll 			: 4.0.31106.0 (Main.031106-0000)
    
    SOURCES
    	Deployment url			: file://fs1/contractflowtool/ContractFlowTool.application
    	Deployment Provider url		: file://fs1/contractflowtool/ContractFlowTool.application
    
    ERROR SUMMARY
    	Below is a summary of the errors, details of these errors are listed later in the log.
    	* Activation of file://fs1/contractflowtool/ContractFlowTool.application resulted in exception. Following failure messages were detected:
    		+ Your Web browser settings do not allow you to run unsigned applications.
    
    COMPONENT STORE TRANSACTION FAILURE SUMMARY
    	No transaction error was detected.
    
    WARNINGS
    	* The manifest for this application does not have a signature. Signature validation will be ignored.
    
    OPERATION PROGRESS STATUS
    	* [8/18/2011 1:36:19 PM] : Activation of file://fs1/contractflowtool/ContractFlowTool.application has started.
    
    ERROR DETAILS
    	Following errors were detected during this operation.
    	* [8/18/2011 1:36:19 PM] System.Deployment.Application.InvalidDeploymentException (Manifest)
    		- Your Web browser settings do not allow you to run unsigned applications.
    		- Source: System.Deployment
    		- Stack trace:
    			at System.Deployment.Application.ApplicationActivator.BrowserSettings.Validate(String manifestPath)
    			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)
    
    COMPONENT STORE TRANSACTION DETAILS
    	No transaction information is available.
    
    


    (installing using the publish.html from Non-IE)

    4. New users of the software go to the site \\fs1\contractflowtool\Publish.html with their native browser (Firefox for the purpose of this example)

    5. They click the install link

    6. they are prompted to save setup.exe and run it

    7. setup.exe gives the following error

    8. Clicking details gives you a similar log to what I posted in my original post, OK closes the program.

     

    (installing by copying setup.exe to the local hard drive)

    4. New users of the software are sent a copy of setup.exe in a email.

    5. They copy setup.exe to their hard drive

    6. The double click setup.exe

    7. setup.exe gives the following error

    8. Clicking details gives you a similar log to what I posted in my original post, OK closes the program.

     

     

    (installing by going to the address and double clicking on setup.exe)

    4. New users of the software windows share \\fs1\contractflowtool\

    5. The double click setup.exe

    6. The program asks Install/Don't Install

    7. The program installs correctly and checks for pre-reqs.

     

    (installing by going to the address and double clicking on the .application file)

    4. New users of the software windows share \\fs1\contractflowtool\

    5. The double click ContractFlowTool.application

    6. The program asks Install/Don't Install

    7. The program installs correctly however it does not check for pre-reqs.

     

    What am I doing wrong for the cases (installing using the publish.html from IE), (installing using the publish.html from Non-IE), and (installing by copying setup.exe to the local hard drive)?


    I know the "Just send them a copy of setup.exe" works when setting the install/publushing folder to a http address instead of a windows share as I have another project that is on a different server that the Instillation Folder URL is similar to "http://example.com/installDir" and we send the Setup.exe to clients and it installs and runs fine.



    18/رمضان/1432 06:51 م
  • What is your installation URL? If you are publishing the deployment to a file share, the installation URL needs to exactly match the location of the software as viewed and installed by the user, so it should be \\fs1\contractflowtool. When you create the deployment, setup.exe is created -- this is the bootstrapper. It checks for the prerequisites, and when they are installed successfully, uses the URL embedded in the setup.exe to call the CLickOnce part of the deployment (i.e. the .application file).

    If you set the installation url to \\fs1\contractflowtool, your users should be able to copy or download the setup.exe and run it and it will pick up the deployment from the right place.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    • تم الاقتراح كإجابة بواسطة Neddy Ren 19/رمضان/1432 06:12 ص
    19/رمضان/1432 03:50 ص
  • Here is the relevent section of the csproj file

    <?xml version="1.0" encoding="utf-8"?>
    <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
     <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
     <ProductVersion>9.0.30729</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{3299FF1B-54B3-40F3-9226-AE2491B556CA}</ProjectGuid>
     <OutputType>WinExe</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>ContractFlowTool</RootNamespace>
     <AssemblyName>ContractFlowTool</AssemblyName>
     <FileUpgradeFlags>
     </FileUpgradeFlags>
     <UpgradeBackupLocation>
     </UpgradeBackupLocation>
     <OldToolsVersion>3.5</OldToolsVersion>
     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     <IsWebBootstrapper>false</IsWebBootstrapper>
     <SccProjectName>SAK</SccProjectName>
     <SccLocalPath>SAK</SccLocalPath>
     <SccAuxPath>SAK</SccAuxPath>
     <SccProvider>SAK</SccProvider>
     <GenerateManifests>true</GenerateManifests>
     <TargetFrameworkProfile>
     </TargetFrameworkProfile>
     <PublishUrl>\\fs1\contractflowtool\</PublishUrl>
     <Install>true</Install>
     <InstallFrom>Unc</InstallFrom>
     <UpdateEnabled>true</UpdateEnabled>
     <UpdateMode>Foreground</UpdateMode>
     <UpdateInterval>7</UpdateInterval>
     <UpdateIntervalUnits>Days</UpdateIntervalUnits>
     <UpdatePeriodically>false</UpdatePeriodically>
     <UpdateRequired>false</UpdateRequired>
     <MapFileExtensions>true</MapFileExtensions>
     <ProductName>Contract Flow Tool</ProductName>
     <SuiteName>Contract Flow Tool</SuiteName>
     <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
     <WebPage>publish.htm</WebPage>
     <ApplicationRevision>68</ApplicationRevision>
     <ApplicationVersion>2.1.0.%2a</ApplicationVersion>
     <UseApplicationTrust>false</UseApplicationTrust>
     <PublishWizardCompleted>true</PublishWizardCompleted>
     <BootstrapperEnabled>true</BootstrapperEnabled>
     </PropertyGroup>
    

     

    As you can see publish URL is

    <PublishUrl>\\fs1\contractflowtool\</PublishUrl>
    

    I leave the Install URL blank, however setting it to the same thing as the publish URL has the same results.

     

    For some reason setup.exe does not use the path in configuration, it always uses the working directory of the exe to look for the files. See my example of my last post of the "installing by going to the address and double clicking on setup.exe" example, it works when you do it that way, but if you copy the exe away from that path it fails.






    22/رمضان/1432 01:41 م
  • Small update, I tried to find my Publishing Folder/Installation URL inside the setup.exe by using a hex editor, however I could not find it. If I changed the Installation URL to "http://example.com/Test" I found it easily.

    Is it a bug of Visual Studio 2010 that you can not use a UNC path for the Installation Folder?

    22/رمضان/1432 07:41 م
  • Hi Scott R. Chamberlain,

    Just as I said, the ClickOnce does not support the "Installaton of shared files", but the Deployment is supported.

    So, you can run the clickOnce application from the network shared folder, but you can't copy the part of the clickonce application and run on your localmachine. Or the default filepath such as the application will find the *.manifest, *.applicaton from the local machine, not the shared folder.

    If you want the application to run after you download it, you will need to use Deployment.

    If you have any questions, please feel free to tell us.

    Best Regards


    Neddy Ren [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    25/رمضان/1432 07:14 ص
  • Just as I said, the ClickOnce does not support the "Installaton of shared files", but the Deployment is supported.

    So, you can run the clickOnce application from the network shared folder, but you can't copy the part of the clickonce application and run on your localmachine.

    I am not running the clickOnce application from the network, I am running the deployment setup.exe. What I want to know is why does the deployment setup.exe work fine when you have a installation url that is a HTTP address but fails if you use a UNC path.
    25/رمضان/1432 01:47 م
  • So, I can guess that maybe on the UNC computer, the folder has no permission to execute a file, just can read or write. Please check it! 
    Neddy Ren [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    26/رمضان/1432 02:26 ص

  • This is my personal permissions and the global permissions given to everyone else in the company.

     

    I do not think this is a permissions issue because if you generate two identical setup.exe files, one with a unc path and one with a http path and you open both in a hex editor you can see the http path in the editor, however in the version with the unc path the source is nowhere to be found . I think it is a bug with ClickOnce, I have opened a bug ticket but have yet to get a response.


    • تم وضع علامة كإجابة بواسطة Neddy Ren 29/رمضان/1432 02:07 ص
    26/رمضان/1432 01:34 م
  • After working on this problem so a few days, I set Publishing Folder Location to my Local IIS. I created a virtual directory. The installation page opens up normally and everything works fine.


    12/جمادى الثانية/1433 05:33 ص
  • Just posting your workaround here that you posted on the Connect bug website:

    "Run the setup.exe from the network path. "

    This worked for me as well.  Thanks.


    - Dan - "Can't never could do anything"


    • تم التحرير بواسطة deadlydog 26/شعبان/1433 10:36 م
    26/شعبان/1433 10:35 م