KB‎ > ‎

HTML Export Problem Caused by Path Lengths

Ref: 2633331 (201011151153)
Last Edited: April 4th, 2013
Development Ref: 81
 
Symptoms: 
 
When exporting to HTML, Visio may crash, and an error is reported in the publication logs (if running an automated publication) or in the progress windows (if running Process Navigator interactively).
 
The error message will depend on the path length. Examples are:
 
15/11/2010 11:16:57
HTML Target Cannot be Written To
The target of the HTML export c:\triaster\processlibraries\processlibrary\sandpit\html\test\long folder name 235xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\a.b.html already exists and is read-only. Check the folder permissions and read-only status.
This condition can also occur in Visio 2003 when Track Markup is turned on.

------------------------------------------------------------------------

15/11/2010 13:05:37
Visio has reported an unanticipated exception when exporting to c:\triaster\processlibraries\processlibrary\sandpit\html\test\long folder name 245xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\aa3.b.html
=== Begin For Triaster Support ===
The following content may be useful to the Triaster support team.
Please copy and paste it into an e-mail to
support@triaster.co.uk
and attach any referenced files if you would like help understanding
how to avoid this issue reoccurring.

File not found.
Visio has reported an unanticipated exception when exporting to c:\triaster\processlibraries\processlibrary\sandpit\html\test\long folder name 245xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\aa3.b.html
System.Runtime.InteropServices.COMException (0x86DB09C6):
File not found.
   at Microsoft.Office.Interop.Visio.PageClass.Export(String FileName)
   at Triaster.ProcessNavigator.Common.ProcessObjects.PageBase.CreateHTMLFile(String strMultiMapRoot, String strTargetRoot, enumVisioVersion lngVisioVersion, Boolean blnUseSubFolders, Boolean blnUseVisio2002MouseOver, Boolean blnUseDescriptionMouseOver, Boolean blnConvertHyperlinkCircleLinks, String strHTMLMapName)
=== Finish For Triaster Support ===
 
------------------------------------------------------------------------
 
15/11/2010 12:00:24
Failure exporting c:\triaster\map store\processlibrary\2 maps for review\Test\Long Folder Name 250xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\aa3.vdx to html.
=== Begin For Triaster Support ===
The following content may be useful to the Triaster support team.
Please copy and paste it into an e-mail to
support@triaster.co.uk
and attach any referenced files if you would like help understanding
how to avoid this issue reoccurring.
The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
Failure exporting c:\triaster\map store\processlibrary\2 maps for review\Test\Long Folder Name 250xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\aa3.vdx to html.
System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
   at System.IO.Path.SafeSetStackPointerValue(Char* buffer, Int32 index, Char value)
   at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck)
   at System.IO.Path.GetFullPathInternal(String path)
   at System.IO.Directory.GetParent(String path)
   at Triaster.ProcessNavigator.Common.Helper.FileSupport.GetPath(String strFileAndPath)
   at Triaster.ProcessNavigator.Common.ProcessObjects.PageBase.CreateHTMLFile(String strMultiMapRoot, String strTargetRoot, enumVisioVersion lngVisioVersion, Boolean blnUseSubFolders, Boolean blnUseVisio2002MouseOver, Boolean blnUseDescriptionMouseOver, Boolean blnConvertHyperlinkCircleLinks, String strHTMLMapName)
   at Triaster.ProcessNavigator.Common.ProcessObjects.PageBase.ExportToHTML(String strMultiMapRoot, String strTargetRoot, enumVisioVersion lngVisioVersion, Boolean blnUseSubFolders, Boolean blnAddHeaderAndFooter, String strHeaderFileName, String strFooterFileName, enumHTMLMetaTagOptions lngMetaTagOptions, Boolean blnUseVisio2002MouseOver, Boolean blnUseDescriptionMouseOver, Boolean blnConvertHyperlinkCircleLinks)
   at Triaster.ProcessNavigator.Common.ProcessObjects.Map.ExportToHTML(String strTargetRoot, Boolean blnAddHeaderAndFooter, String strHeaderFileName, String strFooterFileName, enumHTMLMetaTagOptions lngMetaTagOptions, Boolean blnUseVisio2002MouseOver, Boolean blnUseDescriptionMouseOver, Boolean blnConvertHyperlinkCircleLinks)
   at Triaster.ProcessNavigator.AnalystEdition.clsExportToHTML.PerformExport(String strTargetRoot, Boolean blnIncludeHeaderAndFooter, String strHeaderFileName, String strFooterFileName, Boolean blnAddMetadata, Boolean blnIncludeProperties, Boolean blnUseVisio2002MouseOver, Boolean blnUseDescriptionMouseOver, Boolean blnConvertHyperlinkCircleLinks, Boolean blnExportModifiedFilesOnly)
=== Finish For Triaster Support ===
 
Cause:
 
Files or folders to be created in the HTML export would exceed the path-length limit in Windows.
 
The HTML export will create the same folder structure as that in the map store. A folder structure within the map store where path lengths approach the Windows limit can result in paths that would exceed such limits in the HTML repository.
 
Consider a Visio file, MyMap.vdx, which contains a page, MyPage-1. When this file is exported to HTML, files such as the following are created:
 
MyMap.MyPage-1_files\
 arrow.gif
 data.xml
 filelist.xml
 find.js
 frameset.js
 fullpage.gif
 gif_1.gif
 gif_1.html
 gif_1.js
 go.gif
 keys.js
 main_2.html
 maximize.gif
 minimize.gif
 minus.gif
 panminus.gif
 panplus.gif
 plus.gif
 tick-foc.gif
 tick-off.gif
 tick-on.gif
 toc.gif
 toc2.gif
 toolbar.html
 visio.css
 vml_1.emz
 vml_1.html
 vml_1.js
 widgets.html
 zoom.html
 
MyMap.html
MyMap.MyPage.html
 
 
Files and folders are created with names based on the map and page names.
 
Using the above export as an example, the longest path would be that of:
 
MyMap.MyPage-1_files\widgets.html
 
(and other files with the same path length.)
 
created from:
 
MyMap.vdx
 
 
 
Solution:
 
Ensure paths are sufficiently short to avoid the issue. Consider the following:
  • Shorten folder names
  • Avoid deeply-nested folder structures
  • Shorten file names
  • Shorten page names
The maximum path length (including the file name) has been found to be 256 characters. It's recommended that paths should be kept comfortably within this limit to avoid problems.
 
Note that if folders, files and pages are renamed, links (including drill-downs) within those maps, or maps that link to them, may need to be amended.
 
 
 
Applies to:
  • Visio 2003, Visio 2007
  • Process Navigator - all versions               Fixed in PN 11.2
 
 
 
Related Articles:
 
Comments