Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Matt 3 posts 83 karma points notactivated
    Mar 17, 2021 @ 16:19
    Matt
    0

    problems with using Microsoft.Extensions.DependencyInjection

    Hello,

    I'm trying to set up a Azure login in umbraco using this openidconnect example.

    In the example the received access token is stored by using an IMsalTokenCacheProvider. In order to create this I need an instance of ServiceCollection(), which is available through Microsoft.Extensions.DependencyInjection. (relevant file)

    The problem is that when I add this code and package to my project and try to log in on my site, I get an error that the file or assembly Microsoft.Extensions.DependencyInjection.Abstractions could not be found. Umbraco seems to be dependent on this extension (through MiniProfiler) so I cannot remove it, but I also can't make use of Microsoft.Extensions.DependencyInjection this way.

    Would anyone know how I could configure these two packages to work together, or maybe even another way of creating the IMsalTokenCacheProvider?

    Thank you!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies