none
Simple Click Once Deployment generates "An error occurred trying to download" file. RRS feed

  • Question

  • I am using VSTS 2008 on Win XP Pro SP3.

    I generated a simple VB Windows Form Application HelloBill that has a Label "Hello, Bill."

     

    I built a Released version of it.

     

    I used the Build, Publish HelloBill menu selection to publish to http://localhost/HelloBill/.

    I chose the option "this application is only available online".

    The Build and Publish were successful.

    If I go to C:\Inetpub\wwwroot\HelloBill, and click on HelloBill.application, the application runs fine.

    If I try and run either publish.htm or setup.exe, I get:

     

    An error occurred trying to download 'http://scorpio/HelloBill/HelloBill.application'.

    See the setup log file located at 'C:\DOCUME~1\Don\LOCALS~1\Temp\VSD90.tmp\install.log' for more information.

     

    install.log:

    Launching Application.
    URLDownloadToCacheFile failed with HRESULT '-2146697208'
    Error: An error occurred trying to download 'http://scorpio/HelloBill/HelloBill.application'.

     

    IIS.log:

    #Software: Microsoft Internet Information Services 5.1
    #Version: 1.0
    #Date: 2008-05-13 23:02:22
    #Fields: date time c-ip s-computername s-ip s-port cs-method cs-uri-stem sc-status sc-win32-status time-taken cs-host
    2008-05-13 23:46:10 192.168.1.65 SCORPIO 192.168.1.65 80 GET /HelloBill/HelloBill.application 403 5 0 scorpio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     

    This was done with most of the VSTS 2008 default settings.

    IIS 6.0 is up and Running OK.

    What is wrong?

    Why will this not download and run on the localhost?

     

    THANKS for any assistance.

    Tuesday, May 13, 2008 11:54 PM

Answers

  • If you are deploying the .Net 3.5 framework, make sure you have these MIME types set up on the server, so it knows how to handle it:

    .msp --> application/microsoftpatch
    .msu --> application/microsoftupdate

    And just for grins, here are the other ones you need to make sure you have set up:

    .application  --> application/x-ms-application
    .manifest  --> application/x-ms-application
    .deploy   --> application/octet stream

    If you have vsto apps, need to add these MIME types:
    .vsto --> application/x-ms-vsto


    RobinS.
    GoldMail.com


    Ts'i mahnu uterna ot twan ot geifur hingts uto.
    Friday, January 9, 2009 3:45 AM
    Moderator

All replies

  • When you say you go and try to run publish.htm or setup.exe you get an error, what do you mean? Did you go to that folder in inetpub and double click on them? Have you tried opening the browser and typing in http://localhost/HelloBill/publish.htm ?

     

    RobinS.

    GoldMail.com

     

     

    Wednesday, May 14, 2008 12:45 AM
    Moderator
  • And can you post the log that it tells you to look at?

    [edit -- the whole log -- don't tell me it's only 3 lines?]

     

    RobinS.

    GoldMail.com

     

    Wednesday, May 14, 2008 12:46 AM
    Moderator
  • I'm having the same problem and, FYI, after publishing the app, I went to http://[server ip]/[install directory]/publish.htm page to install the application.

     

    I published the application to a company intranet location.  Specifically, it has been published into a virtual directory that is similar to 4 other projects that are on the same server.  I've triple checked all of my settings/permissions rights and the only difference that I am aware of is that the older projects were created and published using Visual Studio 2005.  This project that I'm attempting to publish and test is the first one that I've written in VS08.

     

    I have found this MSDN Knowledge Base article on MSDN, but I don't think that is the problem.  I can access and install my other applications that share it's root directory and each apps virtual directory is configed exactly the same.  What's special about this app?

     

    In helpful tips or insight into this error would be appreciated.  Thanks!

    Monday, July 21, 2008 7:42 PM
  • ...and because people ask, here are the details of the error message:

     

    PLATFORM VERSION INFO
     Windows    : 5.1.2600.196608 (Win32NT)
     Common Language Runtime  : 2.0.50727.1433
     System.Deployment.dll   : 2.0.50727.1433 (REDBITS.050727-1400)
     mscorwks.dll    : 2.0.50727.1433 (REDBITS.050727-1400)
     dfdll.dll    : 2.0.50727.1433 (REDBITS.050727-1400)
     dfshim.dll    : 2.0.50727.1433 (REDBITS.050727-1400)

    SOURCES
     Deployment url   :
    http://SERVER/INSTVIRTDIR/[Application Name].application
          Server  : Microsoft-IIS/6.0
          X-Powered-By : ASP.NET
     Deployment Provider url  :
    http://SERVER/INSTVIRTDIR/[Application Name].application

    ERROR SUMMARY
     Below is a summary of the errors, details of these errors are listed later in the log.
     * Activation of
    http://http://SERVER/INSTVIRTDIR/[Application Name].application resulted in exception. Following failure messages were detected:
      + Downloading http://SERVER/INSTVIRTDIR/[Application Name].
    application did not succeed.
      + The remote server returned an error: (404) Not Found.

    COMPONENT STORE TRANSACTION FAILURE SUMMARY
     No transaction error was detected.

    WARNINGS
     There were no warnings during this operation.

    OPERATION PROGRESS STATUS
     * [7/21/2008 3:42:43 PM] : Activation of http://SERVER/INSTVIRTDIR/[Application Name].
    application has started.

    ERROR DETAILS
     Following errors were detected during this operation.
     * [7/21/2008 3:42:43 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
      - Downloading http://SERVER/INSTVIRTDIR/[Application Name].
    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.DownloadDeploymentManifestDirect(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
       at System.Deployment.Application.DownloadManager.FollowDeploymentProviderUri(SubscriptionStore subStore, AssemblyManifest& deployment, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options)
       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)
       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)

    COMPONENT STORE TRANSACTION DETAILS
     No transaction information is available.

     

     

    Monday, July 21, 2008 7:45 PM
  •  DonBaechtel wrote:

    If I go to C:\Inetpub\wwwroot\HelloBill, and click on HelloBill.application, the application runs fine.

    If I try and run either publish.htm or setup.exe, I get:

    An error occurred trying to download 'http://scorpio/HelloBill/HelloBill.application'.

    See the setup log file located at 'C:\DOCUME~1\Don\LOCALS~1\Temp\VSD90.tmp\install.log' for more information.

     

    install.log:

    Launching Application.
    URLDownloadToCacheFile failed with HRESULT '-2146697208'
    Error: An error occurred trying to download 'http://scorpio/HelloBill/HelloBill.application'.

     

    If you are deploying to localhost, and your publishing folder location is http://localhost/HelloBill try filling in the installation folder as well, using the IP address of your machine, such as http://192.168.0.100/HelloBill/

     

    It may be having trouble resolving the first one for some reason. This is the methodology I use when deploying to localhost, but I test it on a different computer on my network. And since you're getting a 404 error, maybe this is your problem as well.

     

    RobinS.

    GoldMail.com

    Tuesday, July 22, 2008 3:09 PM
    Moderator
  •  RHartness wrote:

    I'm having the same problem and, FYI, after publishing the app, I went to http://[server ip]/[install directory]/publish.htm page to install the application.

     

    What is your publishing folder location and your installation folder location? If your publishing folder location is http://[server ip]/[install directory]/publish.htm and the Installation Folder URL is blank, then this should work.

     

    If your publishing folder location is something like http://ourserver.companyname.com/myapplication/publish.htm and the installation folder URL is blank, then this is what you have to use to get to it.

     

    You are also having a 404 error, which would suggest to me that you are using the wrong link to get to the deployment. Check the http address set for your virtual directory and make sure you are using the right link.

     

    RobinS.

    GoldMail.com

    Tuesday, July 22, 2008 3:13 PM
    Moderator
  • Robin,

    Thanks for the response.  The publish folder location actually looks more like: U:\[mapped server folder]\QuoteSystemUserManager\

    The Installation Folder URL is, obviously something different, and maps to an IP address as opposed to the Server Name.  Specifically, it looks like:

    http://[server ip]/qsuminstall/

    I know the virtual directory is working because I can load the publish.htm file from the URL address.  I can see that the .application file exists in IIS and I've double checked the name multiple times.  I can't figure out why I'm getting a 404 error when the file is there.

    Please note, this has been tried and tested about four times before with other installation packages and everything is working perfectly.  In this instance, the only difference is that I'm publishing through VS08 Professional, instead of VS05 Pro.  Could I be missing something that I should change/have to configure in VS08?
    Thursday, July 24, 2008 8:00 PM
  • So the publish folder looks like a network drive to ClickOnce, right? There's no http:// involved per your example.

     

    So when you put in http://[server ip]/qauminstall/publish.htm you get a publish page displayed, right?

     

    We switched from VS05 to VS08 and it just worked, no problem at all. Are you having VS create your publish page, or have you created your own and suppressed that?  I assume you're not messing around with any post-build commands, or anything that would change the deployment file paths. Do you have the checkbox on the Publish Options for "Use .deploy file extension" checked?

     

    If you publish any application with VS05 to the same location, does it work?

    If you publish another application with VS08 to the same location, does it work?

     

    RobinS.

    GoldMail.com

    Sunday, August 3, 2008 5:30 PM
    Moderator
  • Robin, please see my response to your questions below in bold.
    ==========================================

    So the publish folder looks like a network drive to ClickOnce, right? Correct. There's no http:// involved per your example.

     

    So when you put in http://[server ip]/qauminstall/publish.htm you get a publish page displayed, right? Correct.

     

    We switched from VS05 to VS08 and it just worked, no problem at all. Are you having VS create your publish page, or have you created your own and suppressed that? I'm using the auto-generated publish.htm  I assume you're not messing around with any post-build commands, or anything that would change the deployment file paths. That's a correct assumptions. Do you have the checkbox on the Publish Options for "Use .deploy file extension" checked? Yes, I'm using the .deploy extension, and I have for all of my projects.  I hope your not going to tell me to cut it off-- using .deploy has saved me from quite a few headaches.  Some computers and Anti-Virus packages hate it when you try to download .exe files

     

    If you publish any application with VS05 to the same location, does it work?  I haven't tried this and I didn't think to.  I'll give it a shot.


    If you publish another application with VS08 to the same location, does it work? I haven't tried this either but I have published another project that uses the same root folder, in another Virtual Directory, and it has worked fine.  In fact, it was an upgrade from VS05 to VS08 and I had published it to that location as a test to make sure that it would work on my live server when the time comes for a mandatory update.


    If you're out of ideas, don't worry about this issue much more.  I don't know what's going on but this application isn't critical.  My biggest fear was that this problem would be repeated in the other upgarde project that I mentioned, however, it appears to be working fine.


    If you have any other ideas or if you think that there might be some other setting (possibly outside of Visual Studio) that I might be missing, I'd appreciate the continued help.  If you're stumped, then I don't mind letting this one go.  Either way, thanks for your help!

    Monday, August 4, 2008 12:53 PM
  •  

    No, I'm not going to tell you to cut off the .deploy -- I was concerned that maybe you *had*, and it was causing problems.

     

    I would try publishing it using VS05. It doesn't sound like a VS2008 problem, it sounds like a deployment problem.

     

    Have you tried publishing this project to a different location? Try publishing it to localhost (if you are running IIS on your computer) and see if that works.

     

    There's no reason this application wouldn't work that I can see, unless it's something about the setup on the web server.

     

    RobinS.

    GoldMail.com

     

    Monday, August 11, 2008 4:07 AM
    Moderator
  • I am encountering this exact error message as well. In my case, clickonce is in the process of downloading files as part of the DotNetFX35 redistributable.

    (8/21/2008 1:58:01 PM) Downloading 'DotNetFX35\dotNetFX20\netfx_other.msp' from 'http://xxxxxx.xxxxxx.com/clickonce/DotNetFX35/dotNetFX20/netfx_other.msp' to 'C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\VSD133.tmp\'
    Download completed at 8/21/2008 1:58:42 PM
    Verifying file integrity of C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\VSD133.tmp\DotNetFX35\dotNetFX20\netfx_other.msp
    WinVerifyTrust returned 0
    File trusted

    (8/21/2008 1:58:42 PM) Downloading 'DotNetFX35\dotNetFX20\netfx_other_64.msp' from 'http://xxxxxx.xxxxxx.com/clickonce/DotNetFX35/dotNetFX20/netfx_other_64.msp' to 'C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\VSD133.tmp\'
    Download completed at 8/21/2008 2:00:28 PM
    Downloading failed with HRESULT=-2146697208




    As you can see from the log snippet, other files in this redistributable are downloading fine, but when it gets to netfx_other_64.msp it fails. I have checked the mime types and have entries for MSP files (which is why the others pull down fine) and I have verified the existence of the file on the server.

    Any suggestions?
    Thursday, August 21, 2008 7:19 PM
  • I am having the same problem.  Everyone can download the application fine at home but the computers here at work throw this same error.  Now I think what is happening is one of our network appliances is filtering MIME types and is not allowing .application or .deploy through.  I haven't confirmed this just wanted to throw it out there.

    Wednesday, January 7, 2009 10:05 PM
  • If you are deploying the .Net 3.5 framework, make sure you have these MIME types set up on the server, so it knows how to handle it:

    .msp --> application/microsoftpatch
    .msu --> application/microsoftupdate

    And just for grins, here are the other ones you need to make sure you have set up:

    .application  --> application/x-ms-application
    .manifest  --> application/x-ms-application
    .deploy   --> application/octet stream

    If you have vsto apps, need to add these MIME types:
    .vsto --> application/x-ms-vsto


    RobinS.
    GoldMail.com


    Ts'i mahnu uterna ot twan ot geifur hingts uto.
    Friday, January 9, 2009 3:45 AM
    Moderator
  • Hi,

    I am not able to add the MIME types. I am trying to use Click Once Deployment.

    I am using a IIS 5.1 version for my 3.5 Netframework app, but i am not able to see the framework under the 

    Monday, June 18, 2012 8:06 AM
  • The .NET 3.5 Framework uses the 2.0 CLR, so that's what you want to set it to.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev

    Tuesday, June 19, 2012 6:32 AM
    Moderator