Help 1 File's TOC Links are Broken

Topics: User Forum
Jun 7, 2011 at 7:33 PM

My project builds a perfectly functioning CHM file, but all of the links in the table of contents tree (in the Contents tab) display a standard HTML missing file page that begins with "This program cannot display the webpage". I'm new to SHFB, but I've searched the forum for this and haven't found it. Anybody know what causes this and how to fix it?

Jun 7, 2011 at 8:15 PM

Well, I think I found the answer.  I had the project installed in the "My Documents" tree, but our IT folks had that mounted from network storage. It appears that SHFB or Sandcastle or (more likely) Visual Studio 2010 regards a network directory as untrustworthy, so it prevented the links from working.  I reach this conclusion from having moved my project to a directory on the C: drive and rebuilding. Everything works now!

Jun 8, 2011 at 3:04 PM

See the FAQ topic in the SHFB help file for a registry setting that will allow you to view help files from network shares (Help File Issues | Why doesn't my compiled help file load? / Why do all of the help file topics display a "Page not found" or "This program cannot display the webpage" error?)



Jun 8, 2011 at 3:08 PM

Thanks. That's a big help!

Aug 16, 2011 at 7:07 PM

In short: don't build Sandcastle projects from a UNC path, but map a drive letter.

Just for everyones information, this problem also occurs if you build a CHM with Sandcastle when the project file and all relative paths are in UNC notation.

Even if you add the registry entry from the FAQ.

I had a perfectly working project that built a CHM somewhere from C:\...\My Documents\Visual Studio 2010\Projects\ProjectBlablabla\dingetje.shfbproj but when I added a few interface implementations with generics and an explicit interface implementation to my code the paths were becoming too long, resulting in Sandcastle complaining about it during build.

So what I first did was share the My Documents\Visual Studio 2010\Projects\ProjectBlablabla directory as ProjectBlablabla and opening the Sandcastle Project from \\localhost\ProjectBlablabla and building. That worked, but with the "The page cannot be displayed" error on every page except the one opened by the CHM viewer upon opening the CHM.

However, mapping Z: as \\localhost\ProjectBlablabla and opening Z:\dingetje.shfbproj then building again resolved this issue.