Debugging VS Code in NAV 2018

ara3n
Member Posts: 9,258
Hello I've finally had time to download and install the new NAV 2018. While debugging VS Code, I'm running into the following Error.
Running the page directly from webclient works fine. It's just starting debuging session that the webclient errors out.
Server instance: DynamicsNAV110 Tenant ID: <ii>User: DESKTOP-444VJDR\ahmed Type: System.InvalidOperationException Message: <ii>Dynamic operations can only be performed in homogenous AppDomain.</ii> StackTrace: at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, Object[] args) at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at Microsoft.Dynamics.Nav.Service.Dev.Web.Controllers.DebuggerHub.OnDebuggeeConnected(Object sender, DebugSessionStartEventArgs eventArgs) at Microsoft.Dynamics.Nav.Runtime.Debugger.DebugRuntimeManager.OnDebuggingSessionStarted(DebugSessionStartEventArgs e) at Microsoft.Dynamics.Nav.Runtime.Debugger.DebugRuntimeManager.CreateRuntime(String debuggingContext, NavSession session, Boolean waitForDebugAdapterConfiguration) at Microsoft.Dynamics.Nav.Runtime.NavSession.StartDebuggingSession(String debuggingContext, Boolean waitForDebugAdapterConfiguration) at Microsoft.Dynamics.Nav.Service.NSService.OpenConnection(ConnectionRequest connectionRequest) at SyncInvokeOpenConnection(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.ErrorMappingCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs) Source: System.Core HResult: -2146233079
Server instance: DynamicsNAV110 Tenant ID: <ii>User: DESKTOP-444VJDR\ahmed Type: System.NullReferenceException Message: <ii>Object reference not set to an instance of an object.</ii> StackTrace: at Microsoft.Dynamics.Nav.Runtime.Debugger.DebugRuntime.EnsureDetachedFromConnection(NavSession session) at Microsoft.Dynamics.Nav.Runtime.NavSession.ShutdownDebuggingEnvironment(NavBaseException& firstCaughtException) at Microsoft.Dynamics.Nav.Runtime.NavSession.InnerDispose() at Microsoft.Dynamics.Nav.Runtime.NavSession.<DisposeAsync>d__127.MoveNext() Source: Microsoft.Dynamics.Nav.Ncl HResult: -2147467261
Server instance: DynamicsNAV110 Tenant ID: <ii>User: DESKTOP-444VJDR\ahmed Type: System.NullReferenceException Message: <ii>Object reference not set to an instance of an object.</ii> StackTrace: at Microsoft.Dynamics.Nav.Runtime.Debugger.DebugRuntime.EnsureDetachedFromConnection(NavSession session) at Microsoft.Dynamics.Nav.Runtime.NavSession.ShutdownDebuggingEnvironment(NavBaseException& firstCaughtException) at Microsoft.Dynamics.Nav.Runtime.NavSession.InnerDispose() at Microsoft.Dynamics.Nav.Runtime.NavSession.<DisposeAsync>d__127.MoveNext() Source: Microsoft.Dynamics.Nav.Ncl HResult: -2147467261 </ii>
Running the page directly from webclient works fine. It's just starting debuging session that the webclient errors out.
0
Best Answer
-
Hey,
Try this once
In the Service folder on Service Tier(C:\Program Files\Microsoft Dynamics NAV\110\Service) you will find Microsoft.Dynamics.Nav.Server.exe.
Open this file using Notepad OR VS and select the line <NetFx40_LegacySecurityPolici enabled=”true”/>.
Delete this line and save it and then restart NAV Server Instance.
Now try and see.Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/5
Answers
-
Hey,
Try this once
In the Service folder on Service Tier(C:\Program Files\Microsoft Dynamics NAV\110\Service) you will find Microsoft.Dynamics.Nav.Server.exe.
Open this file using Notepad OR VS and select the line <NetFx40_LegacySecurityPolici enabled=”true”/>.
Delete this line and save it and then restart NAV Server Instance.
Now try and see.Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/5 -
Hello.
Thank you for the solution.
For anybody else who runs into this issue. I had to run Notepad as admin.
open file
C:\Program Files\Microsoft Dynamics NAV\110\Service\Microsoft.Dynamics.Nav.Server.exe.config
remove <NetFx40_LegacySecurityPolicy enabled="true"/>
under the
<runtime>
element.
Restarted Service tier and debugging worked.
0 -
So @ara3n - Rashed Sir finally this is solved OR the issue still exist??
If Solved you can mark the answer as verified.
Hope you are all well, All wishes to you, I know you recently get married.
I know you in person, You are one of the NAV Gurus in my list whom I always admire.Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0 -
Thank you. Well I'm stumped of who you are.0
-
Don't be Stumped, Just Stay Blessed
And all Good Wishes and Growth to ARA Dynamics
Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0
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