Skip to main content

Notifications

Business Central forum
Answered

How to set Basic Authentication in C# ASP.NET (NavUserPassword) - Consuming Business Central On-Premise SOAP URL

Posted on by 36

Hello everyone,

Lately, I've been working on a web application that consumes Business Central APIs. (from a SOAP URL)

The code that I wrote worked just fine before changing the Credential Type from Windows to NavUserPassword (in order to consume APIs with Basic authorization)

pastedimage1638782814823v1.png

But then, (after I changed to NavUserPassword) it started given me a server error (HTTP status 401: Unauthorized)

pastedimage1638782980380v2.png

I did some research about how to set username and password in a header property or something and I found some solutions but none of them worked for me,

Can anyone help me solve this please

Thanks.

  • Verified answer
    medzem Profile Picture
    medzem 36 on at
    RE: How to set Basic Authentication in C# ASP.NET (NavUserPassword) - Consuming Business Central On-Premise SOAP URL

    Okay, Thank you so much Marco

  • Suggested answer
    Marco Mels Profile Picture
    Marco Mels on at
    RE: How to set Basic Authentication in C# ASP.NET (NavUserPassword) - Consuming Business Central On-Premise SOAP URL

    Hello,

    We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist. If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

    Thanks.

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

Dynamics 365 Community Update – Sep 16th

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

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,522 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,441 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans