Copied to clipboard

Flag this post as spam?

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


  • Kevin Jump 2348 posts 14896 karma points MVP 8x c-trib
    Oct 31, 2015 @ 12:22
    Kevin Jump
    0

    Detecting if you are running on Umbraco as a Service

    Hello,

    How do you tell if you are running code on Umbraco as a Service.

    Specifically I want to stop uSync from running on UaaS - as I suspect that would not be ideal.

    is there something like is ApplicationContext.Current.IsConfigured but IsUaaS ? ??

    Kevin

  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Nov 01, 2015 @ 11:40
    Sebastiaan Janssen
    101

    That would not be ideal indeed ;-)

    We always inject an extra dll into each UaaS site which is called Concorde.Messaging.Web.

    You can check for it like so:

    var onUaaS= AppDomain.CurrentDomain.GetAssemblies()
                .Any(a => a.FullName.StartsWith("Concorde.Messaging.Web"));
    

    I would make sure that you log something when you detect this dll so that people have a chance to find out why uSync isn't working.

  • 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