2
The specified path, file name, or both are too long
Question asked by Shoaib Nawaz - 1/16/2019 at 2:38 AM
Answered
Hi,

one of my user receive "Server Error in '/' Application" page when he try to open webmail. 
i open error log and i can see below error. Someone please help me to resolve the issue.

I change the domain name into numbers 12345... and yes domain name is too long and we can not change it.

I am running SM version 15.7 on Windows server 2016 with IIS enabled. All other users are working fine but only receive error on this user. 

Error Log:
[CurrentUser: ingleburn@123456789123456789.com.au]
[1/16/2019 3:07:15 PM]
http://webmail.domain.com.au/Login.aspx

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.

Server stack trace:
   at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.InternalGetDirectoryName(String path)
   at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
   at System.IO.Directory.GetFiles(String path, String searchPattern)
   at MailStore.Mailboxes.Mailbox.Rebuild(UInt32 uidValidityValue)
   at MailStore.Mailboxes.Mailbox.Deserialize()
   at MailStore.Mailboxes.Mailbox..ctor(String rootDirectory, String name, String mmUniqueId)
   at MailStore.Mailboxes.MailboxManager.GetMailbox(String subFolderName)
   at MailStore.Utility.FolderBuilder.BuildFolderList(MailboxManager mm, Char dirsep)
   at MailService.Remoting.Mail.#OX(String #gno, String #wab)
   at MailService.Remoting.Mail.ListFolders(String session, String email, Boolean recursive)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at SmarterMail.RemoteInterface.IMail.ListFolders(String sessionStr, String emailAddress, Boolean recursive)
   at SMWeb.HelperClasses.RemoteWrapper.SessionCallWithConnection[T](UserData usr, Func`2 f)
   at SMWeb.HelperClasses.RemoteWrapper.ListFolders_Inner(UserData usr, String email, Boolean recursive)
   at SMWeb.HelperClasses.Misc.FolderCountHelper.DetectChanges(HttpSessionState session, StringBuilder sb)
   at SMWeb.HelperClasses.CustomPage.OnPreRender(EventArgs e)
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Application Error

2 Replies

Reply to Thread
0
Matt Petty Replied
Employee Post
This is a very unique scenario that will not be easy to fix and may require relocating where you store your SmarterMail data for that domain. I recommend submitting a ticket so you can work with an agent on getting this issue fixed.
Matt Petty Senior Software Developer SmarterTools Inc. www.smartertools.com
0
Shoaib Nawaz Replied
Marked As Answer
Hi Matt, Thanks for the reply. I resolved the issue.
 
It might be helpful for other users so I share my solution:
I recently moved SM 15.7 from server 2008 to server 2016 and also changed the domain path from C:\domains into D:\Smartermail\Backups\Domains. I thought it was not the issue but actually it was the issue.
Stop SM Service, I copy the domain folder from D:\Smartermail\backups\ into D:\Domains, Change path in domainList.xls (location: C:\Program Files (x86)\SmarterTools\SmarterMail\Service) start the service and Issue is resolved. Its causing problem because path is too long.

Reply to Thread