Critical Publication Error - System.ArgumentOutOfRangeException: Length cannot be less than zero

 This article is suitable for an IT Adminstrator

Ref: 201410071315
Last Edited: October 7th, 2014
 

Symptoms

  • A publication fails.
  • A 'Critical Publication Error' e-mail is sent.
  • Errors are recorded in the Publication Server service log.
    Triaster\TriasterServer2011\Logs\Services\PublicationServerLog <Date>.txt

    09:20:25:exception in OnTimedEvent:System.ArgumentOutOfRangeException: Length cannot be less than zero.
    Parameter name: length
       at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
       at PublicationWrapper.clsPublicationServer.MapModified(String strMapFile, String strRootPath)
       at PublicationWrapper.clsPublicationServer.ProcessDirectory(DirectoryInfo objDirInfo, HTMLExportType HTMLExport)
       at PublicationWrapper.clsPublicationServer.AddMapPublishTasks(String strGUID)
       at PublicationWrapper.clsPublicationServer.QueueReadLoadBalance()
       at PublicationWrapper.clsPublicationServer.QueueRead()
       at PublicationWrapper.clsMain.OnTimedEvent(Object state)
    09:20:25:SendEmail Pre-send: <E-mail details>
    System.ArgumentOutOfRangeException: Length cannot be less than zero.
    Parameter name: length
       at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
       at PublicationWrapper.clsPublicationServer.MapModified(String strMapFile, String strRootPath)
       at PublicationWrapper.clsPublicationServer.ProcessDirectory(DirectoryInfo objDirInfo, HTMLExportType HTMLExport)
       at PublicationWrapper.clsPublicationServer.AddMapPublishTasks(String strGUID)
       at PublicationWrapper.clsPublicationServer.QueueReadLoadBalance()
       at PublicationWrapper.clsPublicationServer.QueueRead()
       at PublicationWrapper.clsMain.OnTimedEvent(Object state)


Cause

Map files with a '.VDX' extension (i.e. in upper-case) can cause this behaviour.
 

Resolution

Change '.VDX' extensions to '.vdx'.
 
There are simple CMD scripts ('.cmd' extensions replaced with '.txt) attached to this page that can be used to list and rename files with a '.VDX' extension within a given root folder. The scripts may need to be amended to reflect that root folder.
 
REM ------------------------------
REM ** Configure file root here **
REM ------------------------------
set FileRoot=C:\Triaster\TriasterServer2011\MapStore

Applies to

This is an issue in Triaster Server 14.2 and earlier.

 

Need further help? Contact the Triaster Support team by e-mailing support@triaster.co.uk or by calling us on + 44 (0)870 402 1234.
 
Do you have any feedback or suggestions that you would like to share with Triaster? We would love to hear from you! Please e-mail feedback@triaster.co.uk 
ċ
Change VDX file extension.txt
(1k)
John_Blight,
7 Oct 2014, 05:26
ċ
List VDX files.txt
(1k)
John_Blight,
7 Oct 2014, 05:26