在JobTask导出上随机“目标文件具有可能被阻止的扩展名”

时间:2018-06-06 13:19:41

标签: web-services soap navision dynamics-nav dynamics-nav-2016

我在我的应用程序中使用的Navision 2016 ODATA Web服务存在继承问题。

通常它运行良好,但随机(每100次运行aprox 1次)。它会出现以下堆栈日志:

Server instance: NAV Tenant ID: User: Type: Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLXmlPortNodeProcessException SuppressMessage: False SuppressExceptionCreatedEvent: False FatalityScope: None Message: Could not process node JobTask. The following error occurred: The file that you are trying to create cannot be created. The destination file has an extension that may be blocked. Contact your system administrator. StackTrace:
     at Microsoft.Dynamics.Nav.Runtime.NavXmlPortExporter.TryProcessElement(NavXmlPortNode node)
     at Microsoft.Dynamics.Nav.Runtime.NavXmlPortExporter.LoopElementChildren(NavXmlPortNode node)
     at Microsoft.Dynamics.Nav.Runtime.NavXmlPortExporter.ProcessTextElement(NavXmlPortTextNode node)
     at Microsoft.Dynamics.Nav.Runtime.NavXmlPortExporter.ProcessElement(NavXmlPortNode node)
     at Microsoft.Dynamics.Nav.Runtime.NavXmlPortExporter.TryProcessElement(NavXmlPortNode node)
     at Microsoft.Dynamics.Nav.Runtime.NavXmlPortExporter.Export()
     at Microsoft.Dynamics.Nav.Runtime.NavXmlPort.Export(DataError errorLevel)
     at Filter.InvokeWithFilter(NavMethodScope )
     at Microsoft.Dynamics.Nav.Runtime.NavMethodScope.Run()
     at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50005.ExportJobTask(NavXmlPortHandle jobTaskXML)   --- End of stack trace from previous location where exception was thrown ---
     at Microsoft.Dynamics.Nav.Runtime.TaskHelper.Rethrow(Exception exception)
     at Microsoft.Dynamics.Nav.Service.WebServices.ServiceBroker.Invoke(Boolean isSoapMessage, Uri url, XmlReader input, TextWriter output, NavUserAuthentication navUserAuth)
     at Microsoft.Dynamics.Nav.Service.WebServices.NavWebService.<>c__DisplayClass5.<>c__DisplayClass7.<ProcessMessage>b__3()
     at Microsoft.Dynamics.Nav.Service.WebServices.Disposer.Scope(Code code)
     at Microsoft.Dynamics.Nav.Service.WebServices.WCFUtil.GetPopulatedMemoryStream(StreamFillingCallback callback)
     at Microsoft.Dynamics.Nav.Service.WebServices.NavWebService.ProcessMessage(Message message)
     at SyncInvokeProcessMessage(Object , Object[] , Object[] )
     at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
     at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
     at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
     at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
     at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet) Source: Microsoft.Dynamics.Nav.Ncl HResult:
-2146233088
---------------------------------- Type: Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLFileLoadException SuppressMessage: False SuppressExceptionCreatedEvent: False FatalityScope: None Message: Could not process node JobTask. The following error occurred: The file that you are trying to create cannot be created. The destination file has an extension that may be blocked. Contact your system administrator. StackTrace:
     at Microsoft.Dynamics.Nav.Runtime.NavFile.InternalCreateOrOpen(DataError errorLevel, FileOption options, Boolean checkFileType)
     at Microsoft.Dynamics.Nav.Runtime.NavFile.ALCreate(DataError errorLevel, String createName, TextEncoding encoding)
     at Microsoft.Dynamics.Nav.Runtime.NavBLOB.ALExport(String fileName)
     at Microsoft.Dynamics.Nav.BusinessApplication.XMLport50000.Job_Task_a45_Exporta58a58OnAfterGetRecord_Scope.OnRun()
     at Filter.InvokeWithFilter(NavMethodScope )
     at Microsoft.Dynamics.Nav.Runtime.NavMethodScope.Run()
     at Microsoft.Dynamics.Nav.BusinessApplication.XMLport50000.Job_Task_a45_Exporta58a58OnAfterGetRecord()
     at Microsoft.Dynamics.Nav.Runtime.NavXmlPortTableNode.FireExportTrigger(NavTrigger trigger)
     at Microsoft.Dynamics.Nav.Runtime.NavXmlPortExporter.ProcessTableElement(NavXmlPortTableNode node)
     at Microsoft.Dynamics.Nav.Runtime.NavXmlPortExporter.ProcessElement(NavXmlPortNode node)
     at Microsoft.Dynamics.Nav.Runtime.NavXmlPortExporter.TryProcessElement(NavXmlPortNode node) Source: Microsoft.Dynamics.Nav.Ncl HResult: -2146233088

你知道这个错误的根源是什么吗?

1 个答案:

答案 0 :(得分:2)

它选择的随机文件名是否与服务层配置中的禁止文件扩展名列表相匹配?可以解释为什么它如此随机。

尝试暂时禁用此选项以查看是否可以解决问题。我认为这是一个平台错误,所以应该向微软报告。

Set prohibited extensions

默认情况下会阻止以下扩展程序:

  

ADE; ADP;应用程序; ASP;球棒; BAS; CHM;在cmd;玉米; CPL; CSH; EXE; FXP;小工具; HLP; HTA; INF;插件; ISP;其; JS; JSE; KSH; LNK ;狂; MAF; MAG; MAM; MAQ;擦伤; MAS;垫;茂; MAV;鱼鳔; MDA; MDB; MDE; MDT; MDW; MDZ; MSC; MSI; MSP; MST; OPS; PCD; PIF; PRF ; PRG; PST; REG,SCF,SCR; SCT; SHB; SHS; URL; VB; VBE; VBS; vsmacros; VSS; VST; VSW; WS; WSC; WSF; WSH