Welcome to Jobserve Labs

We help Microsoft fix Visual 2010 Help Manager

 
Posted 10/02/2010 11:33:56 in Technical

In a previous post we described a bug in the VS2010 Beta 2 MSDN product which prevents you from getting hold of help collections etc when you sit behind an Http proxy.

In that post we provided a solution which involved leveraging Fiddler’s ability to chain together proxy authentication on an application’s behalf.

We also spotted this post on MSDN Forums and posted an answer indicating a possible solution for the person who opened the issue.

As you’ll notice from the bottom post – a request was made by an employee of Microsoft to see if we could help them test a fix that they had in mind.  We did; the fix didn’t work completely, but we were then able to diagnose exactly why the fix didn’t work and have subsequently discovered how to make the Beta 2 MSDN 2010 Help Library Manager without having to use Fiddler.  Based on our investigation, the team at Microsoft are now working on a fix – and might already have applied it in the Release Candidate of VS2010 – which released in the last week.

Use at your own risk!

Before we go into the details, it must be stressed that this fix is not offered officially by Microsoft and therefore carries no guarantees from them.  We also make no guarantees about this fix either – it will involve changing registry settings and if this turns out to break anything else on your machine, then we will accept no responsibility for that.  It’s your choice to follow our directions here!

Step 1

Modify the HelpLibManager.exe.config file found in Program Files [(x86) if on a 64 bit box]\Microsoft Help\v3.0 and add the following xml inside the <configuration /> node:

<system.net>
  <defaultProxy useDefaultCredentials="true" >
  </defaultProxy>
</system.net>

Save the config file.

On its own, this fix allows the help manager to ‘see’ the collections that are available for download – but it does not actually fix the problem of the download itself.

Step 2

This is the messy bit. 

Open up the Registry Editor and make sure that registry value HKLM\Software\Microsoft\Windows\CurrentVersion\BITS\UseLMCompat is set to zero (the reason why is explained in a moment).  If you need to change it, you should make a note of the previous value – or better yet, create a System Restore Point.

Restart the Background Intelligent Transfer Service, and then start up the help library manager.  It should all now work without any problems – assuming you have internet connectivity at all; and that your user name and password allow you through the proxy in the first place :)

Why does it work?

We ‘discovered’ that Help Library Manager uses BITS (Background Intelligent Transfer Service) to initiate and manage the actual downloads of the content.  Presumably this is because the files are typically rather large.  This runs in a separate process and is communicated with over a COM interface, therefore the configuration file fix has no effect on that.

After some poking and prodding, we discovered that when a BITS transfer is initiated, the caller has the opportunity to specify the credentials to be used for the network connection.  Working on the basis that the code in the Help Library can’t be setting these credentials (otherwise it would work), we looked for a way to get BITS to use default credentials.  The article from the last link above provides the answer to that – which yields the registry hack.

Be aware that modifying this registry value affects all software that uses BITS – and therefore it’s just possible that other things might stop working as a result.

As we mentioned earlier – we don’t know if the bug has been redressed in the RC of Visual Studio 2010 – our findings, including this fix, were submitted to Microsoft on the 27th January – so it’s possible it was too late.

Hopefully, however, it’ll be fixed by the final release date!

 

That’s it for now, but stay tuned: We have some very exciting news on the way in the next couple of weeks; but we’re not allowed to talk about it yet ;)

JobServe is not responsible for, nor does it provide any guarantee of functionality or safety of, the content of any external sites mentioned in this article. JobServe do not endorse, condone the use of, or recommend any products or technologies not specifically owned or built by JobServe itself. Finally, the views expressed in this article are those of the article author and do not necessarily reflect the views of JobServe itself.