Copied to clipboard

Flag this post as spam?

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


  • Nik 1608 posts 7234 karma points MVP 7x c-trib
    Nov 03, 2015 @ 14:35
    Nik
    0

    Getting Umbraco Version of several sites pragmatically

    Hi guys/gals,

    I'm working on a dashboard that displays the state of our current array of Umbraco sites. I don't particularly want to be creating unnecessary code within all of websites if the functionality already exists.

    When I'm logged into the back office it displays the current version on the Help dialog which appears to be getting its value from the

    Umbraco.Sys.ServerVariables.application.version

    property however I can't seem to find where this is set. All I can find is the hard coded value which I'm pretty sure isn't correct as this reads 7 on a site that is reporting 7.2.8.

    Looking through the Angular, I can't seem to find any other places where this is set however.

    Is it possible to query an Umbraco site to get it's current version? At the same time, where abouts in the source code is the Call Home functionality to check for upgrades?

    Thanks,

    Nik

  • Kevin Jump 2327 posts 14813 karma points MVP 8x c-trib
    Nov 03, 2015 @ 17:54
    Kevin Jump
    1

    Hi

    For security reasons you can't get the version without being logged in to the backend some how. The controller that returns the information requires authentication. but the version info is retrieved in the call to

    http://sitename/umbraco/servervariables 
    

    this is called by the back office on loading so if you are in the backoffice Umbraco.Sys..... has the info you need, you don't need to call this url - but for remote sites it would return it - if you are logged in.

    if you require the version without logging in then you probably would need to write a bit of code :(

    an ApiController that returned Umbraco.Core.Configuration.UmbracoVersion.Current would give you the version.

  • Sebastiaan Janssen 5058 posts 15520 karma points MVP admin hq
    Nov 04, 2015 @ 12:06
    Sebastiaan Janssen
    0

    If you have access to the file paths of the sites then you could also read the version number from web.config.

Please Sign in or register to post replies

Write your reply to:

Draft