Announcements
Hi to all,
we have a big problem connecting with visual studio code to Business Central Spring 2019 CU 15.
We have a server #1 BC with credential type login UserName (mandatory for us) and also we have server #2 BC web instance perfectly connected with ssl.
The web client is working. The RTC client is working.
We can't download the symbols and do not debugging with visual studio code. Port 7049 and other ports are open. We always get the error when debugging
In app.json:
Hi Marco,
Can you explain how authentication would work in such a scenario and wouldn't it require 2 service instances? One for AccessControlService(AAD) and one for NavUserPassword?
With NavUserPassword as soon as you hit the webclient, you'll be asked for NavUserPassword credentials and wouldn't get redirected to login.microsoftonline.com.
Hello,
Best is to use AAD authentication for your users by using NavUserPassword on the NST. NavUserPassword will support both NavUserPassword and AAD authentication. For development purposes, you can use NavUserPassword in visual studio code. Your users can use modern authentication / AAD authentication.
Thanks.
Hello,
I use UserName in server instance, because, as described from microsoft we have user not in LAN Domain that have to connect to the BC server. These users are from other customer or from the same domain of the server but in a WAN environment and they can't have a windows profile setup with the user of the same domain of the BC server.
In this situation Microsft say to use UserNamen credential type.
In the visual studio code the difference between windows and userpassword mode are the request of digit user and password. In the windows mode the visual studio get the user of the windows profile, in user pasword ask for a user and a password. I use the userpassword in the visual studio because we have our pc setting up with windows profile of our office 365 user but we have to connect with our domain\user in the BC server.
But our question is: "if I have to connect to a BC of my customer what kind of user and what kind of instance BC credential type I have to use???"
Thansk in advance.
Best Regards
Hello,
In launch.json you did select UserPassword which is expecting authentication type in NST instanc to be configuered with NavUserPassword. Here the authentication type is UserName. In Visual Studio code / AL Designer, you have option of AAD, UserPassword and Windows. Best match would be Windows when using UserName, but I did not test myself if that would work. There is no specific authentication type that does support a similar one as UserName.
AAD authentication type is not supported in this setup.
More information here:
https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-json-files
Hope it does help.
Thanks.
Yes.
It' configured with UserName, not NavUserPassword. Is it the problem? I can't connect with visual studio code with credential type DOMAIN\user and password but I have to connect with navuserpassword?
Hello,
The NST instance is configured with UserName authentication and not NavUserPassword?
Thanks.
Thank for reply first of all.
I modified in this way:
{
"version": "0.2.0",
"configurations": [
{
"type": "al",
"request": "launch",
"name": "server1",
"port": 7049,
"server": "https://bc.domain.com",
"serverInstance": "BC140",
"authentication":"UserPassword",
"startupObjectId": 22,
"startupObjectType": "Page",
"breakOnError": true,
"launchBrowser": true,
"enableLongRunningSqlStatements": true,
"enableSqlInformationDebugger": true,
"tenant": "default"
}
]
}
But I receive the same error.
[2020-08-05 18:02:18.28] Error: An error occured while processing the request.
Request ID: 1b869515-a449-494f-b9c2-3fea57b29abe
Session ID: c76645e8-f865-4ce0-83d1-5fa3965bf249
If you are targeting a cloud instance, supply these IDs if contacting Microsoft support.
Microsoft (R) AL Compiler version 5.0.4.50830
Copyright (C) Microsoft Corporation. All rights reserved
Compilation started for project 'TestConnessioneBC365' containing '1' files at '18:2:18.301'.
error AL1045: The package cache c:\Users\RamonC\Documents\AL\TestConnBC365\./.alpackages could not be found.
Compilation ended at '18:2:18.303'.
Error: The package could not be created.
Now I have linked the orignal sql db Demo Database BC (14-0) in the BC instance e try to connect to web server local instance but nothing to do. The result is the same error.
I begin to think I don't have any symbols installed on the server, but in the folder "C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\140\AL Development Environment" I have the right files of the install DVD...
Also I tried to connect in the browser the link
bc.domain.com:7249/.../packages
but nothing to do. I didn't get the page.
Thanks in advance to all.
Your launch.json seems not correct. "server" should be https://bc.domain.icom" (server name without the instance name) and "serverInstance": "BC140",
André Arnaud de Cal...
294,190
Super User 2025 Season 1
Martin Dráb
232,968
Most Valuable Professional
nmaenpaa
101,158
Moderator