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 2342 posts 14889 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 5060 posts 15522 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.

Please Sign in or register to post replies

Write your reply to:

Draft