Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
This is my code
[RuntimeLevel(MinLevel = RuntimeLevel.Run)] public class RegisterMediaRouteComposer : IUserComposer { public void Compose(Composition composition) { composition.Components().Append<RegisterMediaRouteComponent>(); } } public class RegisterMediaRouteComponent : IComponent { IMediaService _mediaService; IUmbracoContextFactory _context; MembershipHelper _MembershipHelper; UmbracoHelper _umbracoHelper; public RegisterMediaRouteComponent(IMediaService mediaService, IUmbracoContextFactory context,UmbracoHelper umbracoHelper) { _mediaService = mediaService; _context = context; _umbracoHelper = umbracoHelper; } public void Initialize() { } public void Terminate() { } }
Hi Wilmar,
Please don't inject those two helpers. They heavily rely on HttpContexts and so will have issues if used outside of the scope of them.
There are alterative services you can inject so the question becomes, what are you actually trying to do?
Thanks
Nik
Hi I need to read the current logged in member I know that MembershipHelper provides my with that method. do you know other way to acces current member
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Im getting this weird error when i try to inject UmbracoHelper or MembershipHelper
This is my code
Hi Wilmar,
Please don't inject those two helpers. They heavily rely on HttpContexts and so will have issues if used outside of the scope of them.
There are alterative services you can inject so the question becomes, what are you actually trying to do?
Thanks
Nik
Hi I need to read the current logged in member I know that MembershipHelper provides my with that method. do you know other way to acces current member
is working on a reply...