DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

DependencyProvider not found in Globals

You are not authorized to post a reply.

New Around Here


    We have a DNN Portal with some .cs files from your development project (like "login.ascx.cs"), and after the upgrade from 9.3.2 to 9.9.1, we fetched the .cs files from your 9.9.1 project, and Compiling the solution we get " 'Globals' does not contain a definition for 'DependencyProvider' ".
    We already checked, multiple times, and the "DotNetNuke.dll" has the 9.9.1 version. We already tried to apply the .dll from you deploy .zip file and still get the same error. we compiled your entire solution in release and used the dlls but still the same.
    Can you give us a hand please?

    Veteran Member

      You definitely need to provide more details ...

      You upgraded a DNN installation from 9.3.2 to 9.9.1? Did you do necesary modules upgrades? (Check the release notes for versions from 9.3.2 up to 9.9.1.)

      Why did you "fetch the .cs files"? What are you trying to do?

      What are you trying to compile? If you want to compile the entire DNN solution, you'll want to find Peter Donker's videos on doing this. Start with https://www.youtube.com/watch?v=TkJqO8DYj8o and look for the link to Peter's video list in the Notes.
      Joe Craig
      DNN MVP
      Patapsco Research Group

      New Around Here

        our DNN portals are always based on your "DotNetNuke.Website.csproj" so we stick with the .cs files. and it´s great since we always do some twicks/changes in your code.
        but sticking to the point, after trying to build our website with the dlls with version 9.9.1 we get the error and can´t get passed it.


        Advanced Member

          I'm guessing by login.ascx.cs you're referring to the skin object, DNN Platform/Website/admin/Skins/Login.ascx.cs, right? Unfortunately, Globals.DependencyProvider is marked as internal and so isn't available outside of the DNN Platform itself. At this point, SkinObjectBase doesn't support dependency injection so there's not a mechanism available to you to get an INavigationManager instance. For now you'll need to use the Globals.NavigateURL method instead.

          DNN partner specializing in custom, enterprise DNN development https://engagesoftware.com/showcase

          New Around Here

            It solved it! Ty!
            Regarding the removal of Globals.NavigateURL in v11, before that will Globals.DependencyProvider work outside of the DNN Platform itself?

            Advanced Member

              The plan 🤞🏻 is for dependency injection to work in all areas of the platform in DNN 10 so that Globals.DependencyProvider is no longer needed.

              DNN partner specializing in custom, enterprise DNN development https://engagesoftware.com/showcase
              You are not authorized to post a reply.

              These Forums are dedicated to the discussion of DNN Platform.

              For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

              1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
              2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
              3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
              4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
              5. No Flaming or Trolling.
              6. No Profanity, Racism, or Prejudice.
              7. Site Moderators have the final word on approving / removing a thread or post or comment.
              8. English language posting only, please.

              Would you like to help us?

              Awesome! Simply post in the forums using the link below and we'll get you started.

              Get Involved