ERROR Downloading Manifest

Topics: Updater Application Block
Oct 29, 2003 at 9:38 PM
originally posted by: aakil

Hi - I've tried it all, and eventually went back to the samples and ran them (SelfUpdating is the one that I'm most interested in). But it just doesn't work... this is the log that gets generated...

ApplicationUpdateManager.StartUpdater :
The Updater has started; the target application's name is 'SelfUpdatingTest'. Time started: 20031029_09:28:20.

DownloaderManager.RunDownloader :
Checking on updates for application 'SelfUpdatingTest'.


DownloaderManager.IsServerManifestDownloaded :
DOWNLOAD STARTED: Downloading manifest for the application 'SelfUpdatingTest'. Time started: 20031029_09:28:20


DownloaderManager.IsServerManifestDownloaded :
SOURCE FILE: 'http://localhost/selfupdating/ServerManifest.xml'


DownloaderManager.IsServerManifestDownloaded :
DEST FILE: 'C:\Program Files\Microsoft Application Blocks for .NET\Updater\Code\DemoFiles\SelfUpdaterClient\ServerManifest.xml'


DownloaderManager.IsServerManifestDownloaded :
The metadata file (the Server Manifest) can't be downloaded for the application 'SelfUpdatingTest'.
Either the manifest is unavailable (check download URL in Updater config file), the downloader failed, or
the Manifest failed validation.
ERROR: Exception from HRESULT: 0x8020000F.
STACK: at Microsoft.ApplicationBlocks.ApplicationUpdater.Downloaders.IBackgroundCopyJob.GetError(IBackgroundCopyError& ppError)
at Microsoft.ApplicationBlocks.ApplicationUpdater.Downloaders.BITSDownloader.HandleDownloadErrorCancelJob(IBackgroundCopyJob copyJob, String& errMessage) in C:\Program Files\Microsoft Application Blocks for .NET\Updater\Code\CS\Microsoft.ApplicationBlocks.Updater\Microsoft.ApplicationBlocks.ApplicationUpdater\BITSDownloader.cs:line 482
at Microsoft.ApplicationBlocks.ApplicationUpdater.Downloaders.BITSDownloader.Microsoft.ApplicationBlocks.ApplicationUpdater.Interfaces.IDownloader.Download(String sourceFile, String destFile, TimeSpan maxTimeWait) in C:\Program Files\Microsoft Application Blocks for .NET\Updater\Code\CS\Microsoft.ApplicationBlocks.Updater\Microsoft.ApplicationBlocks.ApplicationUpdater\BITSDownloader.cs:line 191
at Microsoft.ApplicationBlocks.ApplicationUpdater.DownloaderManager.IsServerManifestDownloaded() in C:\Program Files\Microsoft Application Blocks for .NET\Updater\Code\CS\Microsoft.ApplicationBlocks.Updater\Microsoft.ApplicationBlocks.ApplicationUpdater\DownloaderManager.cs:line 438

All the updater samples do the same thing. It starts the app, creates a BIT**.tmp file and log file, and after a couple of seconds - updates the log file with the above...

Anyone got any ideas?

Sacha
Oct 30, 2003 at 6:01 AM
originally posted by: wsabey

try entering http://localhost/selfupdating/ServerManifest.xml in your browser address bar to see if it returns the xml. If not, the selfupdating virtual directory may not be configured for web sharing properly.
Oct 30, 2003 at 7:17 PM
originally posted by: Springstone

Yes, I've checked that and it's fine. I've also tried copying the server components to another server, everything enabled, and I get the same error. It looks to me like the problem is in the AppUpdate component. For some reason it isn't able to download.

Anyone know what the status is on other types of downloaders? From what I've been reading, a lot of people are having problems with BITS - so it doesn't seem to me to be a very good option.

Anyone got any other ideas?
Oct 31, 2003 at 3:33 AM
originally posted by: Kabak


Personally, I had so much trouble with this application block (and go no help to the one message I posted here) that I scrapped it and built my own in much less time than it had already taken me to try to get this one to work. It does much what the app block does without BITS.
Oct 31, 2003 at 3:34 AM
originally posted by: Kabak


Personally, I had so much trouble with this application block (and got no help to the one message I posted here) that I scrapped it and built my own in much less time than it had already taken me to try to get this one to work. It does much what the app block does without BITS.
Oct 31, 2003 at 6:03 AM
originally posted by: wsabey

so far BITS has been working fine on my windows2000 machine with SP3
what are your server/client machines and their patch levels?
Oct 31, 2003 at 6:39 PM
originally posted by: Springstone

Hmm, the question is what haven't I tried. Ok, the client is always Windows XP SP 1 with everything patched (windowsupdate and security updates). I've tried various server, the same Windows XP, and seperate XP machine, W2K server with SP3 - I have literally followed every bit of setup information I can find on this and suggestions - but everyone seems to have problems downloading certain files...

I can't download anything - and it has nothing to do with how the machines / directories are setup. BITS is installed and running. ETC ETC... I just get that error when trying to get the server manifest. OH, and it has NOTHING to do with validation - cause I turned validation off...

So the only other error it could be is the the BITS downloader is failing internally...
Nov 1, 2003 at 5:00 AM
originally posted by: wsabey

Haven't tried XP. Can you try a 2000 client just to check? It looks like many of the reported errs are with XP. Did you try the suggestion in XP&2K3?
Nov 1, 2003 at 5:05 AM
originally posted by: wsabey

Kabak
Would you mind sharing how you got around Bits? did you cannibalize the solution or build your own from scratch? anything you can share is greatly appreciated! thanks, Bill
Nov 1, 2003 at 5:16 AM
originally posted by: Kabak


I wrote my own class that does file copies from a location specified in an xml .config file to a temp folder at a location also specified in the .config file. It goes by version numbers on folders like the block and recursively copies files for any version numbers greater than the last version applied (also stored in the .config file). It raises an event when an update has been found and has finished being copied from the source (into a temp folder that is then renamed to an update folder). The class is equipped with a timer that can be set for an initial update search delay and a regular search schedule. On the timer fire event, the class looks at the source server for a new version folder.

I call this updater class on a low-priority thread from the application I want to update and hook onto its UpdateFound event. When that event trips, I give the user a message that an update is ready and will be applied next time they restart the application.

This is paired with a starter app that copies the files from the update folder to the main application folder and then launches the main application.

We are using this successfully with both a windows app and a .NET Excel add-in (which requires a little more complexity because an excel process cannot be running anywhere on the system when the update is to be applied).

Hope this helps,


Amanda
Nov 1, 2003 at 7:18 PM
originally posted by: Springstone

Thanks for the response Amanda. I understand the principal, and really didn't want to go write all this myself :)

I had previously been using a Microsoft release .NETUpdater ( a bit older ) with great success. I figured that the UAB would be a better / more robust solution so I decided to convert my app to use this. I've now spent 4 days trying to get the thing to work, and am very tired of seeing the same error message - over and over. I can't seem to nail down the problem. I have narrowed it down to the BITS downloader, somewhere in there it is causing a problem.

I am also wondering if there hasn't been any recent security patches or updates that might have changed something on the BITS side. The funny thing is that when I originally installed the UAB in early October it worked. The log files were telling me that the sample were being updated.

And then, about two weeks later I started to implement it in something I'm working on. And I kept on getting the same errors. 2 days later I checked the samples and they just didn't work anymore. I don't know what has changed on my machine, cause I didn't touch the sample/iis etc.

Again I feel that there is a lot of problems with the BITS downloader, and ask when there will be practical alternatives available. Is the UAB still be actively developed on?

Sacha
Nov 4, 2003 at 7:29 AM
originally posted by: minton

"Either the manifest is unavailable (check download URL in Updater config file), the downloader failed, or the Manifest failed validation."

The first thing I would do is try turning off validation. You can do this in the SelfUpdatingTest.exe.config by changing the line
- <application name="SelfUpdatingTest" useValidation="true">
to
- <application name="SelfUpdatingTest" useValidation="false">

In my experience so far most of the problems I have encountered have been validation issues. <b>If validation is used, and the manifest has been changed, or any of the files referred to in the manifest have been changed, then the manifest MUST be recreated, or it will fail validation.</b>

As far as BITS is concerned. The error messages produced from it leave a lot to be desired. I have had UAB and BITs work with IIS and Apache, but ran into problems trying to use Tomcat 4.x as the server, even though it supports HTTP/1.1. But since Tomcat is really an application server, I didn't see the point in trying to make it work.

I hope this helps.
Mar 9, 2004 at 9:28 PM
originally posted by: nmarathe

Hi Aakil,

I am facing the same problem with UAB. Here is the log of the updation activity.


ApplicationUpdateManager.StartUpdater :
The Updater has started; the target application's name is 'UpdaterBlockSample'. Time started: 20040309_12:05:48.

DownloaderManager.RunDownloader :
Checking on updates for application 'UpdaterBlockSample'.


DownloaderManager.IsServerManifestDownloaded :
DOWNLOAD STARTED: Downloading manifest for the application 'UpdaterBlockSample'. Time started: 20040309_12:05:48


DownloaderManager.IsServerManifestDownloaded :
SOURCE FILE: 'http://niranjan/UpdateServer/Manifest.xml'


DownloaderManager.IsServerManifestDownloaded :
DEST FILE: 'C:\PagePlanner\Manifest.xml'


ApplicationUpdateManager.StopUpdater :
DownloaderManager thread named 'DownloadManagerThreadUpdaterBlockSample694d2a37-6863-6561-6c53-74756172742a' had to be interrupted; it did not respond in the allotted timeout to the stop event.


ApplicationUpdateManager.StopUpdater :
The Updater is stopping updates for the application named 'UpdaterBlockSample'. Time stopped: 20040309_12:05:51.

DownloaderManager.IsServerManifestDownloaded :
The metadata file (the Server Manifest) can't be downloaded for the application 'UpdaterBlockSample'.
Either the manifest is unavailable (check download URL in Updater config file), the downloader failed, or
the Manifest failed validation.
ERROR: Exception from HRESULT: 0x8020000F.
STACK: at Microsoft.ApplicationBlocks.ApplicationUpdater.Downloaders.IBackgroundCopyJob.GetError(IBackgroundCopyError& ppError)
at Microsoft.ApplicationBlocks.ApplicationUpdater.Downloaders.BITSDownloader.HandleDownloadErrorCancelJob(IBackgroundCopyJob copyJob, String& errMessage)
at Microsoft.ApplicationBlocks.ApplicationUpdater.Downloaders.BITSDownloader.Microsoft.ApplicationBlocks.ApplicationUpdater.Interfaces.IDownloader.Download(String sourceFile, String destFile, TimeSpan maxTimeWait)
at Microsoft.ApplicationBlocks.ApplicationUpdater.DownloaderManager.IsServerManifestDownloaded()

I am on the verge of giving up the UAB and build my own updation mechanism. If you have found any solution to this, please let me know.

Thanks and Regards,

Niranjan
Mar 9, 2004 at 10:40 PM
originally posted by: Duncanma

Hey folks, I feel for your pain with these errors... they seem quite hard to diagnose. I was wondering if anyone had tried doing a BITS download directly (of another file and/or of the manifest file) to ensure that it is working.

You could test this using my background copying application (http://msdn.microsoft.com/library/en-us/dncodefun/html/code4fun02282003.asp) and you might also want to pull down the BITS console ... http://msdn.microsoft.com/library/default.asp?url=/library/en-us/bits/bits/bitsadmin_tool.asp and run it during the time between the download start and end to determine if the BITS job is completing successfully...

Also... does anyone have any idea what value is being passed in for maxTimeWait in that call to download the server manifest? I'm wondering if it is just timing out?
May 27, 2004 at 4:23 AM
originally posted by: erivard

I am running on Win 2K Server, and getting these same "manifest.xml" errors. The strange thing is, it used to work just fine. Aside from rebuilding my server, I have lost all hope. I doubt it is a timeout error, since the error happens almost immediately. Has anyone figured this out yet????

DownloaderManager.IsServerManifestDownloaded :
The metadata file (the Server Manifest) can't be downloaded for the application 'MyProgram'.
Either the manifest is unavailable (check download URL in Updater config file), the downloader failed, or
the Manifest failed validation.

Thanks!
May 27, 2004 at 5:36 AM
originally posted by: olismith

I am getting the same result sporadically - only on manifest.xml downloads - never any errors on file downloads. I noticed the default setting for timeout of the manifests is set to 60000 ms (1 minute). We were seeing these errors right after a deploy was issued because network traffic is slowed due to so many people hitting the update server. While debugging this, I found that the BITSDownloader/HandleDownloadErrorCancelJob is getting called, not because BITS returned an error, but because our timeout occurred. As a side effect, the copyJob.GetError method throws an exception because BITS doesn't have any error information, and thus the copyJob.Cancel method never gets called, leaving orphaned BITS jobs in the queue.

Here's what I added to HandleDownloadErrorCancelJob around the error logging:

copyJob.GetState( out state );

// ERROR info is only filled up by BITS if the job has a status of ERROR.
if (state == BGJOBSTATE.BGJOBSTATE_ERROR)
{
// Get and log the error information
}
copyJob.Cancel();
Jun 5, 2004 at 3:00 AM
originally posted by: IRacerx

This might not be the problem but I had similiar issues, was due to some negligence on my side :-)

If you used the code from the samples to setup your ApplicationUpdateManager, more specifically the code from the console samples and you get an error similiar to the following :

ApplicationUpdateManager.StopUpdater :
DownloaderManager thread named 'DownloadManagerThreadUpdaterBlockSample694d2a37-6863-6561-6c53-74756172742a' had to be interrupted; it did not respond in the allotted timeout to the stop event.


ApplicationUpdateManager.StopUpdater :
The Updater is stopping updates for the application named 'UpdaterBlockSample'. Time stopped: 20040309_12:05:51.

DownloaderManager.IsServerManifestDownloaded :
The metadata file (the Server Manifest) can't be downloaded for the application 'UpdaterBlockSample'.
Either the manifest is unavailable (check download URL in Updater config file), the downloader failed, or
the Manifest failed validation.
ERROR: Exception from HRESULT: 0x8020000F.

The problem might be that you are actually stopping the updater before it can actually start downloading anything.

Look for a lines of code similiar to this appUpdater.StopUpdater();

This will cause the updater to interrupt the thread which will give you the error message you're getting.
This caused me a couple of hours of head scratching :S
I should pay more attention when just copying and pasting code, maybe you've got similiar problem in your code.

hth


Jun 15, 2004 at 9:39 PM
originally posted by: robbj

I also had this problem. The exception that was being thrown in BITSDownloader.Download() was:

"The operation being requested was not performed because the user has not logged on to the network.\r\nThe specified service does not exist."

I came across the following:
http://www.faqshop.com/misc/default.htm?http://www.faqshop.com/misc/bits/unable%20to%20add%20file%20to%20job.htm

Right enough, I log on as a VPN client and so it looks as if I'm not authorized. I have to admit, although the design of the UAB looks good, it's been a pain to get running. I think I'll be looking elsewhere.....