Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Business Central forum

Getting "The request for path /NAV/dev/metadata failed with code Unauthorized. Reason: Unauthorized" error when debugging an extension against Docker container

(0) ShareShare
ReportReport
Posted on by 55

Hi,

I just setup a new Docker container using the latest version of Business Central 13.0. I am able to run the web and windows clients without issue however when I try to launch an extension using F5 I receive the following error message:

Sending request to bc13tb/.../metadata
The request for path /NAV/dev/metadata failed with code Unauthorized. Reason: Unauthorized
Error: An internal error has occurred

This is my launch.json file:

{
"name": "BC13tb",
"type": "al",
"request": "launch",
"server": "http://BC13tb",
"serverInstance": "NAV",
"authentication": "UserPassword",
"startupObjectId": 22,
"breakOnError": true,
"breakOnRecordWrite": false
}

I am prompted for my username and password - I am using the same username and password (which is my local user ID and domain password) that I use for the Web client which works. I noticed that the docker results text did not include an admin user name and password like I have seen in other articles, not sure if that is the issue. Here is is the output from the PowerShell command used to generate the container:

Assign Premium plan for BC13TB\TBAKKEN
Container IP Address: 172.21.116.168
Container Hostname : BC13tb
Container Dns Name : BC13tb
Web Client : http://BC13tb/NAV/
Dev. Server : http://BC13tb
Dev. ServerInstance : NAV

Files:
http://BC13tb:8080/al-2.0.43900.vsix

Thank you,

Troy

Categories:
  • Troy Bakken Profile Picture
    55 on at
    RE: Getting "The request for path /NAV/dev/metadata failed with code Unauthorized. Reason: Unauthorized" error when debugging an extension against Docker container

    Hi Stefano,

    I have cleared the credential cache and restarted the container. Odd that everything else works in the container other than running the Visual Studio code – it’s as if it is expecting different credentials.

    Troy

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at
    RE: Getting "The request for path /NAV/dev/metadata failed with code Unauthorized. Reason: Unauthorized" error when debugging an extension against Docker container

    Have you try to clear credentials (AL:Clear Credentials)?

    If so, maybe restarting the container?

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central forum

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans