web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Extension 2.0 - Running Debug gives me "Sorry that didn't work." An error has occurred

(0) ShareShare
ReportReport
Posted on by 92

So I am trying to run my extension with debugging and every time it comes up with Sorry that didn't work. An Error has occurred. - Restart

When I run F6 the Web Client opens just fine and my code is loaded and I can run my code just fine.  I just want to be able to debug it for an error I'm receiving.  How can I get F5 to run so that I can debug my code?

Here are the Event View Warnings:

Server instance: DynamicsNAV110
Tenant: <ii>default</ii>
<ii>Session type: WebClient
Session ID: 340
This license is not compatible with this version of Dynamics NAV.</ii>

Server instance: DynamicsNAV110
Tenant: <ii>default</ii>
<ii>Session type: WebServiceClient
Session ID: 330
This license is not compatible with this version of Dynamics NAV.</ii>

Here are my Event viewer errors.

Error accessing Website 
Raw Url: 
Url: 
Type: Microsoft.Dynamics.Nav.Types.Exceptions.NavServerSessionException
Message: The server "DynamicsNAV110" was unable to process the request. The application will close.
StackTrace:
   at Microsoft.Dynamics.Nav.Client.ConnectionEstablisher.OpenConnection[TChannel](ConnectFailedEventArgs connectFailedArgs, ConnectionRequest connectionRequest, ConnectionOptions connectionOptions, SpnSetting spnSettingToTry, Boolean allowSpnSettingsSwap, UserSettings& userSettings)
   at Microsoft.Dynamics.Nav.Client.ConnectionEstablisher.OpenConnection[TChannel](ConnectionRequest connectionRequest, ConnectionOptions connectionOptions, UserSettings& userSettings)
   at Microsoft.Dynamics.Nav.Client.ServiceConnection.OpenConnection()
   at Microsoft.Dynamics.Nav.Client.ServiceConnection.Initialize()
   at Microsoft.Dynamics.Nav.Client.FormBuilder.BuilderSessionInitializer.OpenConnectionToServer()
   at Microsoft.Dynamics.Nav.Client.FormBuilder.BuilderSessionInitializer.InitializeCore()
   at Microsoft.Dynamics.Nav.Client.FormBuilder.BuilderSessionInitializer.Initialize()
   at Microsoft.Dynamics.Framework.UI.UISession.Initialize()
   at Microsoft.Dynamics.Nav.Client.Web.NavWebUISessionInitializer.InitializeCore(UISession session)
   at Microsoft.Dynamics.Nav.WebClient.NavWebClientUISessionInitializer.InitializeCore(UISession session)
   at Microsoft.Dynamics.Nav.Client.Web.NavWebUISessionInitializer.Initialize(UISession session)
   at Microsoft.Dynamics.Framework.UI.Client.OpenFormExecutionStrategy.TryInitializeUiSession(UISession session)
   at Microsoft.Dynamics.Framework.UI.Web.WebOpenFormExecutionStrategy.TryInitializeUiSession(UISession session)
   at Microsoft.Dynamics.Framework.UI.Client.OpenFormExecutionStrategy.Execute()
   at Microsoft.Dynamics.Framework.UI.InteractionManager.<>c__DisplayClass8_0.<InvokeInteractions>b__3()
Source: Microsoft.Dynamics.Nav.Client.ServiceConnection----------------------------------
Type: Microsoft.Dynamics.Nav.Types.Exceptions.NavServerSessionException
Message: The server "DynamicsNAV110" was unable to process the request. The application will close.
StackTrace:

Source: ----------------------------------
Type: System.InvalidOperationException
Message: Dynamic operations can only be performed in homogenous AppDomain.
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

Server instance: DynamicsNAV110
Tenant ID: 
<ii>User: CBIZ\gnilsen0
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
</ii>

Server instance: DynamicsNAV110
Tenant ID: 
<ii>User: CBIZ\gnilsen0
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>

Server instance: DynamicsNAV110
Tenant ID: 
<ii>User: CBIZ\gnilsen0
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>


*This post is locked for comments

I have the same question (0)
  • Verified answer
    Marcellus Profile Picture
    2,735 on at
    RE: Extension 2.0 - Running Debug gives me "Sorry that didn't work." An error has occurred

    Hi Gnilsen,

    In the "C:\Program Files\Microsoft Dynamics NAV\110\Service\Microsoft.Dynamics.Nav.Server.exe.config"

    did you set the  the enabled value on the following key to false? <NetFx40_LegacySecurityPolicy enabled="false"/>

    After updating the value you will also need to restart your service.

  • gnilsen Profile Picture
    92 on at
    RE: Extension 2.0 - Running Debug gives me "Sorry that didn't work." An error has occurred

    Thank you so much!  It was set to true.  Once I set it to false then I was able to debug.  

  • Marcellus Profile Picture
    2,735 on at
    RE: Extension 2.0 - Running Debug gives me "Sorry that didn't work." An error has occurred

    Hi Gnilsen, great news, happy debugging :)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Saurav.Dhyani Profile Picture

Saurav.Dhyani 2 Super User 2025 Season 2

#1
Alexander Ermakov Profile Picture

Alexander Ermakov 2

#3
RK-25090803-0 Profile Picture

RK-25090803-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans