Export site error

GTEK IT DEV Team asked on December 23, 2019 09:18

I want to export my site to import to another place. But in the export progress. This error always occured.

ERROR:  Error compressing package
Message: 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.

Exception type: System.IO.PathTooLongException
Stack trace:
at System.IO.PathHelper.GetFullPathName()
at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
at System.IO.File.ReadAllText(String path)
at CMS.AzureStorage.BlobInfoProvider.GetBlobContent(BlobInfo blobInfo, BlobRequestOptions requestOptions)
at CMS.AzureStorage.BlobInfoProvider.GetBlobContentWithOptions(BlobInfo blobInfo)
at CMS.AzureStorage.FileStream.InitFileStream()
at CMS.AzureStorage.FileStream..ctor(String path, FileMode mode, FileAccess access, IDateTimeNowService dateTimeNowService)
at CMS.AzureStorage.File.OpenRead(String path)
at CMS.CMSImportExport.ExportProvider.CompressEntry(ZipArchive zipArchive, String entryPath, String tmpPath)
at CMS.CMSImportExport.ExportProvider.CompressFolder(SiteExportSettings settings, ZipArchive zipArchive, String path, String tmpPath)
at CMS.CMSImportExport.ExportProvider.CompressFolder(SiteExportSettings settings, ZipArchive zipArchive, String path, String tmpPath)
at CMS.CMSImportExport.ExportProvider.CompressFolder(SiteExportSettings settings, ZipArchive zipArchive, String path, String tmpPath)
at CMS.CMSImportExport.ExportProvider.CompressFolder(SiteExportSettings settings, ZipArchive zipArchive, String path, String tmpPath)
at CMS.CMSImportExport.ExportProvider.CompressFolder(SiteExportSettings settings, ZipArchive zipArchive, String path, String tmpPath)
at CMS.CMSImportExport.ExportProvider.CompressFolder(SiteExportSettings settings, ZipArchive zipArchive, String path, String tmpPath)
at CMS.CMSImportExport.ExportProvider.CompressFolder(SiteExportSettings settings, ZipArchive zipArchive, String path, String tmpPath)
at CMS.CMSImportExport.ExportProvider.CompressFolder(SiteExportSettings settings, ZipArchive zipArchive, String path, String tmpPath)
at CMS.CMSImportExport.ExportProvider.CreateZipPackage(SiteExportSettings settings)

How can i fix it?

Recent Answers


Brenden Kehren answered on December 23, 2019 15:42

It's complaining about your media library files (and posibly some other Kentico files). So I'd suggest NOT exporting your media library physical files. See if this helps your issue.

0 votesVote for this answer Mark as a Correct answer

GTEK IT DEV Team answered on December 24, 2019 04:01

The same issue still occured after i remove media files from export options. This time the export progress take more time than before i remove media file option.

This is export progress log:

The file is being compressed
Copying ASPX templates folder
Copying site folders
Copying global folders
Copying 'Page layouts' component files
Exporting Page layouts
Exporting Website
Copying 'Device profiles' component files
Exporting Device profiles
Copying 'Page templates' component files
Copying 'Page templates' files
Exporting Page templates
Exporting Page templates
Copying 'Modules' files
Exporting Modules
Exporting Classes
Copying 'Avatars' avatars
Exporting Avatars
Exporting Badges
Exporting Consents
Exporting Countries
Exporting Cultures
Exporting License keys
Exporting Macro rules
Exporting Search engines
Exporting Time zones
Exporting Translation services
Exporting Web part containers
Exporting Notification gateways
Exporting Activity types
Exporting Contact statuses
Exporting Bad words
Exporting Content categories
Exporting Users
Copying 'Page types' files
Copying 'Page types' component files
Exporting Page types
Exporting custom table 'Menu Navigation' data
Exporting custom table 'Menu Type' data
Exporting custom table 'Contact Us' data
Copying 'Custom tables' component files
Exporting Custom tables
Copying 'Web parts' component files
Copying 'Web parts' files
Exporting Web parts
Exporting Widgets
Exporting Roles
Exporting Workflow actions
Exporting Workflows
Exporting Event attendees
Exporting Pages mvt combinations
Exporting Page mvt variants
Exporting Pages personalization variants
Exporting Blog post subscription
Exporting Blog comments
Exporting Page aliases
Exporting Page categories
Exporting Scheduled tasks
Exporting Workflow histories
Exporting Attachment histories
Exporting Version histories
Exporting Ad-hoc relationship
Exporting Page relationships
Copying 'Attachment' files
Exporting Attachment
Exporting ACLs
Exporting Pages
Exporting Email templates
Copying 'Form controls' files
Copying 'Form controls' metafiles
Exporting Form controls
Exporting Macro identities
Exporting Resource strings
Exporting Scheduled tasks
Exporting Smart search indexes
Exporting Setting keys
Exporting Setting keys
Copying 'System tables' component files
Exporting System tables
Exporting Workflow scopes
Exporting Currencies
Exporting Automation actions
Exporting Automation processes
Exporting Notification templates
Exporting Reports
Exporting Saved reports
Exporting Staging servers
Preparing export
0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on December 24, 2019 06:01

Does the use running the site/application pool have read/write permissions to the /CMSSiteUtils directory?

0 votesVote for this answer Mark as a Correct answer

GTEK IT DEV Team answered on December 24, 2019 12:00

I'm using administrator account for this app pool. So in don't think permisson is the problem for this issue.

0 votesVote for this answer Mark as a Correct answer

GTEK IT DEV Team answered on December 24, 2019 12:19 (last edited on December 24, 2019 12:19)

I found the file TestModify.txt with content

Creating '/CMSSiteUtils/TestFiles/TestFolder200752318275/' - OK

Creating '/CMSSiteUtils/TestFiles/TestFolder200752318275/TestFile200752318275.txt' - OK

Deleting '/CMSSiteUtils/TestFiles/TestFolder200752318275/TestFile200752318275.txt' - OK

Deleting '/CMSSiteUtils/TestFiles/TestFolder200752318275/' - OK

Modifying '/CMSSiteUtils/TestFiles/TestModify.txt' - OK

So this mean the app pool have permission to modify the CMSSiteUtils folder, right?

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on December 27, 2019 10:55

What is the file name of the exported package and what is your physical disk structure? Isn't it possible that your CMS folder of Kentico is buried somewhere deep in the disk folder structure?

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.