While trying to add a package/file from an UNC location for a new software import, the following error message in the NS logs is noticed after the Import Software UI took a long time before erroring out:
Failed to get UNC tree.
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.
This happened while waiting for loading the 'package contents' UI under Manage>Software>right-click>Import Software> Import Software
: Specify Software. The option for the package source was "Access package from an existing UNC"
Failed to get UNC tree.
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.
[System.IO.PathTooLongException @ mscorlib]
at System.IO.PathHelper.GetFullPathName()
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.FileInfo.Init(String fileName, Boolean checkHost)
at Altiris.SoftwareManagement.WebApi.Controllers.PackageController.<BuildTree>b__23(String o)
at System.Linq.Enumerable.WhereSelectArrayIterator'2.MoveNext()
at System.Linq.Buffer'1..ctor(IEnumerable'1 source)
at System.Linq.OrderedEnumerable'1.<GetEnumerator>d__0.MoveNext()
at Altiris.SoftwareManagement.WebApi.Controllers.PackageController.BuildTree(String packageFolder, String path, PackageTreeNode parent)
at Altiris.SoftwareManagement.WebApi.Controllers.PackageController.BuildTree(String packageFolder, String path, PackageTreeNode parent)
at Altiris.SoftwareManagement.WebApi.Controllers.PackageController.BuildTree(String packageFolder, String path, PackageTreeNode parent)
at Altiris.SoftwareManagement.WebApi.Controllers.PackageController.BuildTree(String packageFolder, String path, PackageTreeNode parent)
at Altiris.SoftwareManagement.WebApi.Controllers.PackageController.BuildTree(String packageFolder, String path, PackageTreeNode parent)
at Altiris.SoftwareManagement.WebApi.Controllers.PackageController.BuildTree(String packageFolder, String path, PackageTreeNode parent)
at Altiris.SoftwareManagement.WebApi.Controllers.PackageController.BuildTree(String packageFolder, String path, PackageTreeNode parent)
at Altiris.SoftwareManagement.WebApi.Controllers.PackageController.BuildTree(String packageFolder, String path, PackageTreeNode parent)
at Altiris.SoftwareManagement.WebApi.Controllers.PackageController.BuildTree(String packageFolder, String path, PackageTreeNode parent)
at Altiris.SoftwareManagement.WebApi.Controllers.PackageController.BuildTree(String path, AllowedPathTypes pathTypes, ImpersonationProfiles profile)
Exception logged from:
at Altiris.SoftwareManagement.WebApi.Controllers.PackageController.BuildTree(String, Altiris.SoftwareManagement.WebApi.Controllers.PackageController+AllowedPathTypes, Altiris.SoftwareManagement.WebApi.Controllers.PackageController+ImpersonationProfiles)
at Altiris.SoftwareManagement.WebApi.Controllers.PackageController.GetPackageTreeFromUnc(Altiris.SoftwareManagement.WebApi.Models.Requests.UncPackageTreeRequest)
at .lambda_method(System.Runtime.CompilerServices.Closure, Object, Object[])
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor+ActionExecutor+<>c__DisplayClass10.<GetExecutor>b__9(Object, Object[])
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(System.Web.Http.Controllers.HttpControllerContext, System.Collections.Generic.IDictionary<String,Object>, System.Threading.CancellationToken)
at System.Web.Http.Controllers.ApiControllerActionInvoker+<InvokeActionAsyncCore>d__0.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start<TStateMachine>(TStateMachine&)
at System.Web.Http.Controllers.ApiControllerActionInvoker.InvokeActionAsyncCore(System.Web.Http.Controllers.HttpActionContext, System.Threading.CancellationToken)
at System.Web.Http.Controllers.ActionFilterResult+<ExecuteAsync>d__2.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start<TStateMachine>(TStateMachine&)
at System.Web.Http.Controllers.ActionFilterResult.ExecuteAsync(System.Threading.CancellationToken)
at System.Web.Http.Controllers.ExceptionFilterResult+<ExecuteAsync>d__0.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start<TStateMachine>(TStateMachine&)
at System.Web.Http.Controllers.ExceptionFilterResult.ExecuteAsync(System.Threading.CancellationToken)
at System.Web.Http.Dispatcher.HttpControllerDispatcher+<SendAsync>d__1.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start<TStateMachine>(TStateMachine&)
at System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsync(System.Net.Http.HttpRequestMessage, System.Threading.CancellationToken)
at System.Net.Http.HttpMessageInvoker.SendAsync(System.Net.Http.HttpRequestMessage, System.Threading.CancellationToken)
at System.Web.Http.Dispatcher.HttpRoutingDispatcher.SendAsync(System.Net.Http.HttpRequestMessage, System.Threading.CancellationToken)
at Altiris.SoftwareManagement.WebApi.ApiControllerAntiForgeryHandler.SendAsync(System.Net.Http.HttpRequestMessage, System.Threading.CancellationToken)
at System.Web.Http.HttpServer+<SendAsync>d__0.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start<TStateMachine>(TStateMachine&)
at System.Web.Http.HttpServer.SendAsync(System.Net.Http.HttpRequestMessage, System.Threading.CancellationToken)
at System.Net.Http.HttpMessageInvoker.SendAsync(System.Net.Http.HttpRequestMessage, System.Threading.CancellationToken)
at System.Web.Http.WebHost.HttpControllerHandler+<ProcessRequestAsyncCore>d__0.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start<TStateMachine>(TStateMachine&)
at System.Web.Http.WebHost.HttpControllerHandler.ProcessRequestAsyncCore(System.Web.HttpContextBase)
at System.Web.TaskAsyncHelper.BeginTask(System.Func<System.Threading.Tasks.Task>, AsyncCallback, Object)
at System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(System.Web.HttpApplication+IExecutionStep, Boolean&)
at System.Web.HttpApplication+PipelineStepManager.ResumeSteps(Exception)
at System.Web.HttpApplication.BeginProcessRequestNotification(System.Web.HttpContext, AsyncCallback)
at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(System.Web.Hosting.IIS7WorkerRequest, System.Web.HttpContext)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32)
at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr, System.Web.RequestNotificationStatus&)
at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr, System.Web.RequestNotificationStatus&)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32)
HTTP [POST]: http://localhost/altiris/softwaremanagement/api/unc/tree
ip: [127.0.0.1]; languages: [en-US]; content-length: [61];
response: [200 OK]; x-smp-nsversion: [8.1.4528.0];
-----------------------------------------------------------------------------------------------------
Date: 5/2/2017 11:48:29 AM, Tick Count: 84137126 (23:22:17.1260000), Size: 6.98 KB
Process: w3wp (6628), Thread ID: 629, Module: Altiris.SoftwareManagement.WebApi.dll
Priority: 1, Source: UploadController
ITMS 8.x
Exceeding the 260 characters allowed for the path, file name, or both in the picker:
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.
Adjust the size for the package/file path or file name. Long names or paths for the UNC path is not allowed.
As well you could also use "Access package from a directory on the NS" if the package is actually in a share on the SMP Server itself.