NAV 2013 NAS File Import Call back Error

NAVPRAKASH
Member Posts: 10
Dear Experts
I’m trying import txt file using NAS. NAS throws the Call back error while using the standard SlientUpload function. I have tried in RTC Client for importing the file, NAV repeatedly asked confirmation dialog to access the File every time in a new NAV session. I have overcome the confirmation dialog using the “ServicePrincipalNameRequired” = true in the user ClientUserSetting. After this setting it stopped asking confirmation in RTC Client. But It seems the same confirmation is comes in the NAS too. This was reason for error in the NAS Import. I have tried to create SPN for the Domin user. Any special setup is required in Config file for this? Any suggestion is highly appreciated.
The below message for Event Log
The Microsoft Dynamics NAV Application Server session has failed. Reason: Type: Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLCallbackNotAllowedException
SuppressMessage: False
FatalityScope: None
Message: Microsoft Dynamics NAV Application Server attempted to issue a client callback to create a DotNet object: System.IO.File (CodeUnit 419 File Management). Client callbacks are not supported on Microsoft Dynamics NAV Application Server.
StackTrace:
at Microsoft.Dynamics.Nav.Runtime.HeadlessClientCallback.CreateDotNetHandle(String assemblyFullName, String typeName, Guid formHandle, String varName, Boolean createInstance, Object[] arguments)
at Microsoft.Dynamics.Nav.Runtime.NavDotNet.CheckTypeIsLoaded()
at Microsoft.Dynamics.Nav.Runtime.NavDotNet.InvokeStaticMethod[T](String methodName, UInt32 methodIndex, Object[] arguments)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit419.UploadFileSilent_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit419.UploadFileSilent(NavText clientFilePath)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit419.OnInvoke(Int32 memberId, Object[] args)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit58141.OnRun_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit58141.OnRun(INavRecordHandle εrec)
at Microsoft.Dynamics.Nav.Runtime.NavCodeunit.DoRun(DataError errorLevel, NavRecord record)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit59000.OnRun_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit59000.OnRun(INavRecordHandle εrec)
at Microsoft.Dynamics.Nav.Runtime.NavCodeunit.DoRun(DataError errorLevel, NavRecord record)
at Microsoft.Dynamics.Nav.Runtime.NavCodeunit.InvokeRun(Int32 objectId, Object[] args)
at Microsoft.Dynamics.Nav.Runtime.NavApplicationServer.InternalStartNas(Object config)
Source: Microsoft.Dynamics.Nav.Ncl
HResult: -2146233088
Thanks in advance
I’m trying import txt file using NAS. NAS throws the Call back error while using the standard SlientUpload function. I have tried in RTC Client for importing the file, NAV repeatedly asked confirmation dialog to access the File every time in a new NAV session. I have overcome the confirmation dialog using the “ServicePrincipalNameRequired” = true in the user ClientUserSetting. After this setting it stopped asking confirmation in RTC Client. But It seems the same confirmation is comes in the NAS too. This was reason for error in the NAS Import. I have tried to create SPN for the Domin user. Any special setup is required in Config file for this? Any suggestion is highly appreciated.
The below message for Event Log
The Microsoft Dynamics NAV Application Server session has failed. Reason: Type: Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLCallbackNotAllowedException
SuppressMessage: False
FatalityScope: None
Message: Microsoft Dynamics NAV Application Server attempted to issue a client callback to create a DotNet object: System.IO.File (CodeUnit 419 File Management). Client callbacks are not supported on Microsoft Dynamics NAV Application Server.
StackTrace:
at Microsoft.Dynamics.Nav.Runtime.HeadlessClientCallback.CreateDotNetHandle(String assemblyFullName, String typeName, Guid formHandle, String varName, Boolean createInstance, Object[] arguments)
at Microsoft.Dynamics.Nav.Runtime.NavDotNet.CheckTypeIsLoaded()
at Microsoft.Dynamics.Nav.Runtime.NavDotNet.InvokeStaticMethod[T](String methodName, UInt32 methodIndex, Object[] arguments)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit419.UploadFileSilent_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit419.UploadFileSilent(NavText clientFilePath)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit419.OnInvoke(Int32 memberId, Object[] args)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit58141.OnRun_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit58141.OnRun(INavRecordHandle εrec)
at Microsoft.Dynamics.Nav.Runtime.NavCodeunit.DoRun(DataError errorLevel, NavRecord record)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit59000.OnRun_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit59000.OnRun(INavRecordHandle εrec)
at Microsoft.Dynamics.Nav.Runtime.NavCodeunit.DoRun(DataError errorLevel, NavRecord record)
at Microsoft.Dynamics.Nav.Runtime.NavCodeunit.InvokeRun(Int32 objectId, Object[] args)
at Microsoft.Dynamics.Nav.Runtime.NavApplicationServer.InternalStartNas(Object config)
Source: Microsoft.Dynamics.Nav.Ncl
HResult: -2146233088
Thanks in advance
0
Comments
-
Hi
I'm also facing the same issue. Can you please let me know the Navision 2013 Build that you are using?
Thanks.0 -
I'm using Build 7.00.342160
-
Does any special Permission is required in the Windows for calling the .Net Variables without Permission Dialog Confirmation or something related to SPN permission ?
I have created simple CU with two lines of Code
FileName := 'C:\T1\T.TXT';
FileName2 := FileMgt.UploadFileSilent(FileName);
I have executed this CU through NAS
The File didn't uploaded and below error logged in Event Viewer. I hope many people have already tried File Import in NAS.
What I'm missing here ?
Server instance: DynamicsNAV70
Session type: Nas
Session ID: 1
The Microsoft Dynamics NAV Application Server session has failed. Reason: Type: Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLCallbackNotAllowedException
SuppressMessage: False
FatalityScope: None
Message: Microsoft Dynamics NAV Application Server attempted to issue a client callback to create a DotNet object: System.IO.File (CodeUnit 419 File Management). Client callbacks are not supported on Microsoft Dynamics NAV Application Server.
StackTrace:
at Microsoft.Dynamics.Nav.Runtime.HeadlessClientCallback.CreateDotNetHandle(String assemblyFullName, String typeName, Guid formHandle, String varName, Boolean createInstance, Object[] arguments)
at Microsoft.Dynamics.Nav.Runtime.NavDotNet.CheckTypeIsLoaded()
at Microsoft.Dynamics.Nav.Runtime.NavDotNet.InvokeStaticMethod[T](String methodName, UInt32 methodIndex, Object[] arguments)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit419.UploadFileSilent_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit419.UploadFileSilent(NavText clientFilePath)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit419.OnInvoke(Int32 memberId, Object[] args)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit60001.OnRun_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit60001.OnRun(INavRecordHandle εrec)
at Microsoft.Dynamics.Nav.Runtime.NavCodeunit.DoRun(DataError errorLevel, NavRecord record)
at Microsoft.Dynamics.Nav.Runtime.NavCodeunit.InvokeRun(Int32 objectId, Object[] args)t
at Microsoft.Dynamics.Nav.Runtime.NavApplicationServer.InternalStartNas(Object config)
Source: Microsoft.Dynamics.Nav.Ncl
HResult: -2146233088
I also got same error in my local system too0 -
As I read your question, you are running the code on the NAS in the service tier.
The upload function reads a file from your client computer to the server. But when the code is executed from the NAS, there is no client - the dotnet exception also mentions that call-backs to the client is not possible - because there is no client.
So if you intend to read the server's file directory, e.g. C:\temp\a.xml, then just read it as is. You haven't listed the exact scenario, but if it e.g. was an XML document, you would just write something like xmldom.load('C:\temp\a.xml'); or if it is something else, you can read it with a file variable: MyFile.OPEN('C:\temp\a.xml');Bardur Knudsen
Microsoft - Dynamics NAV0 -
I'm using the same Codeunit for both Manual run and NAS import purpose . So believe I have to use GUIAllowed in this case. Thanks for clarificatiion0
-
I am also facing same problem. Is there any solution?Jatin Patel
Microsoft Dynamics NAV Consultant
Jatin's Blog0 -
You should look in CU419 and you have to use appropriate DotNet Variable e.g NAV2017 DirectoryHelper has property RunOnClient set to Yes, which throws Callback error, while DotNet Variable ServerDirectoryHelper works fine on Server with Job Queue0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions