Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. This is a first...

This is a first...

Scheduled Pinned Locked Moved The Lounge
javascriptcloudjsoncsharplinq
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Sander RosselS Online
    Sander RosselS Online
    Sander Rossel
    wrote on last edited by
    #1

    We just updated an industry leading tool from version 2019 to 2022 (the latest). One new feature is a REST Web API, which is the main reason we're updating. It works through Swagger in the browser, but calling the API from code proved to be more of a challenge. Apparently, it authenticates using Kerberos or NTLM :| I wouldn't even think that was an option in 2022 (or even at all, for a Web API).

    Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript

    R K 2 Replies Last reply
    0
    • Sander RosselS Sander Rossel

      We just updated an industry leading tool from version 2019 to 2022 (the latest). One new feature is a REST Web API, which is the main reason we're updating. It works through Swagger in the browser, but calling the API from code proved to be more of a challenge. Apparently, it authenticates using Kerberos or NTLM :| I wouldn't even think that was an option in 2022 (or even at all, for a Web API).

      Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript

      R Offline
      R Offline
      raddevus
      wrote on last edited by
      #2

      Sander Rossel wrote:

      Apparently, it authenticates using Kerberos or NTLM :| I wouldn't even think that was an option in 2022 (or even at all, for a Web API).

      Yeah, that is _interesting_. I mean you're still passing a token to get authenticated, I'm guessing? Do you (on the cient side) have to do something special or is it all done on the server side? Is there a special process to generate a special Kerberos token on the client side? I don't know how that works. It sounds confusing. :confused:

      Sander RosselS 1 Reply Last reply
      0
      • R raddevus

        Sander Rossel wrote:

        Apparently, it authenticates using Kerberos or NTLM :| I wouldn't even think that was an option in 2022 (or even at all, for a Web API).

        Yeah, that is _interesting_. I mean you're still passing a token to get authenticated, I'm guessing? Do you (on the cient side) have to do something special or is it all done on the server side? Is there a special process to generate a special Kerberos token on the client side? I don't know how that works. It sounds confusing. :confused:

        Sander RosselS Online
        Sander RosselS Online
        Sander Rossel
        wrote on last edited by
        #3

        Apparently, it works as follows:

        var handler = new HttpClientHandler
        {
        Credentials = new NetworkCredential("username", "password", "domain") // Or use CredentialCache.DefaultCredentials for the current user
        };
        var client = new HttpClient(handler);
        // Use the client here as you normally would.

        You can do this using DI and use the IHttpClientFactory to create your clients. You're not sending tokens, it's more like Basic Authentication.

        Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript

        1 Reply Last reply
        0
        • Sander RosselS Sander Rossel

          We just updated an industry leading tool from version 2019 to 2022 (the latest). One new feature is a REST Web API, which is the main reason we're updating. It works through Swagger in the browser, but calling the API from code proved to be more of a challenge. Apparently, it authenticates using Kerberos or NTLM :| I wouldn't even think that was an option in 2022 (or even at all, for a Web API).

          Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript

          K Offline
          K Offline
          kmoorevs
          wrote on last edited by
          #4

          I hope your experience with Swagger is better than mine! X| IIRC, the real challenge was dealing with intermittent (>50%) timeout errors likely caused by the huge amount of data I was requesting. (caused by the inability to get proper summarized results in the outdated odata service provider) I emailed the vendor to ask for help and report the high occurrence of timeouts and got nowhere. That project was ultimately scrapped due to lack of support from the vendor/customer.

          "Go forth into the source" - Neal Morse "Hope is contagious"

          Sander RosselS 1 Reply Last reply
          0
          • K kmoorevs

            I hope your experience with Swagger is better than mine! X| IIRC, the real challenge was dealing with intermittent (>50%) timeout errors likely caused by the huge amount of data I was requesting. (caused by the inability to get proper summarized results in the outdated odata service provider) I emailed the vendor to ask for help and report the high occurrence of timeouts and got nowhere. That project was ultimately scrapped due to lack of support from the vendor/customer.

            "Go forth into the source" - Neal Morse "Hope is contagious"

            Sander RosselS Online
            Sander RosselS Online
            Sander Rossel
            wrote on last edited by
            #5

            That's not really Swagger's fault. Swagger is just (generated) documentation of a web API with the ability to test the API. If the API sucks, so will Swagger. If anything, Swagger showed you the API sucked and that you didn't need to invest more time in it. The only "bad experience" I've had with Swagger was it breaking when doing some non-standard API development (like having a single endpoint for all functionality, don't ask...). I can't really expect Swagger to handle such weird edge cases.

            Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups