Community
Showing results for 
Search instead for 
Do you mean 
Reply

System.IO.PathTooLongException: The specified path, file name, or both are too long

New Member
Posts: 3
Country: United_Kingdom

System.IO.PathTooLongException: The specified path, file name, or both are too long

Hello all,

 

Our 2010 ACT Premium for Web is showing consistent error messages on the event viewer regarding the user preferences and file path/filename length.

 

Upon inspection my guess is that the location for the preferences fall under the impersonation account roaming data i.e.

C:\Users\<impersonation account>\AppData\Roaming\ACT\ACT For Web\Preferences\UserPreferences\<dbserver>\<db>\userGUID\...

 

So I understand this is quite a mouthful, but still reliant on default locations. Is there any way to point the preferences to be placed into say a directory directly below the root of the harddrive to circumvent this?

Error below:

 

 

error occured on page Default MessageSmiley Very Happyefault error: 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.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)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.IO.File.Open(String path, FileMode mode)
at Act.Shared.Config.ConfigDAO.ISOForceStream(String fileName)
at Act.Shared.Config.ConfigDAO.Serialize(String fileName, Object graph)
at Act.Shared.Config.ConfigDAO.writeXMLNode(String nodeXPath, Object serialObj)
at Act.Shared.Config.Config.SetKeyByPath(String path, Object objectValue)
at Act.Shared.Config.Config.SetValueByPath(String keyName, Object objectValue)
at Act.Framework.Preferences.UserPreferences.SetObjectValue(String name, Object Value, Boolean DB)
at Act.Framework.Preferences.UserPreferences.RetrieveDBPreferences()
at Act.Framework.Preferences.UserPreferences.InitializePreferences()
at Act.Framework.ActFramework.set_PreferenceStorageProvider(IPreferenceStorageProvider value)
at Act.Web.Framework.SecureCaller.SetPrefStorageProvider(ActFramework framework)
at Act.Web.loginPage.setupWebPrefs(Object sender, ConnectionEventArgs e)

Moderator
Posts: 704
Country: USA

Re: System.IO.PathTooLongException: The specified path, file name, or both are too long

Andrew S.,

 

  Unfortunately you canont change the location of the user preferences files.  They're based user for user, so they really can't be stored in a different place.  There may be a way to change it using environment variables, but Swiftpage couldn't even begin to support changes to the operating system of that magnitude.  Unfortunately, the short answer to your question is 'no'.

Billy Clark
Swiftpage
Act! Knowledgebase: http://kb.act.com
New Member
Posts: 2
Country: USA

Re: System.IO.PathTooLongException: The specified path, file name, or both are too long

,Hi guys, I would suggest you to use Long Path tool.

New Member
Posts: 2
Country: USA

Re: System.IO.PathTooLongException: The specified path, file name, or both are too long