Tonći Vatavuk

Results 5 comments of Tonći Vatavuk

In [2sxc documentation](https://docs.2sxc.org/net-code/dependency-injection/dnn.html) is example how to use [DNN DI](https://www.andrewhoefling.com/Blog/Post/dnn-dependency-injection) in skin. Thx @iJungleboy 👍 [How Can I Use Dependency Injection in Dnn Skins/Themes?](https://docs.2sxc.org/net-code/dependency-injection/dnn.html#how-can-i-use-dependency-injection-in-dnn-skinsthemes) ```cs using DotNetNuke.Common.Extensions; using System; using...

I can't reproduce this issues and need more info. Editor is calling several endpoints. One (or more) is throwing this exception. Probably `.../api/2sxc/admin/AppFiles/AppFiles?appId=...`. I need more info about this exceptions...

Thanks @ajplopez , @jeremy-farrance and @skarpik 👍👍👍. Obviously this issue affects many users and it breaks editor UI. It looks that you are getting exception in new `api/2sxc/admin/Code/InlineHelp` endpoint, that...

Thx @bdukes for showing me [dnn DI extension methods](https://github.com/dnnsoftware/Dnn.Platform/blob/9f83285a15d23203cbaad72d62add864ab5b8c7f/DNN%20Platform/Library/Common/Extensions/HttpContextDependencyInjectionExtensions.cs) that can simplify code above. ```cs IServiceScope currentScope = HttpContext.Current.GetScope(); IServiceProvider serviceProvider = HttpContext.Current.GetScope().ServiceProvider; ```

In https://github.com/dnnsoftware/Dnn.Platform/issues/4955#issuecomment-1033428800 is [example code](https://docs.2sxc.org/net-code/dependency-injection/dnn.html#how-can-i-use-dependency-injection-in-dnn-skinsthemes) that can be used in [Skin Object](https://docs.dnncommunity.org/content/features/extensibility/extensions/index.html) also. It is from [2sxc documentation - Depedency Injection in Dnn Skins and Modules](https://docs.2sxc.org/net-code/dependency-injection/dnn.html). Thx @iJungleboy 👍