/// <summary>
        /// ServerURI and other non-confidential info.  This info is available to unauthenticated clients!
        /// There is a similar method like this in the Eclipse Proxy.
        /// </summary>
        public System.Web.Mvc.ActionResult GetWebServerData()
        {
            var data = new WebServerData {
                Proxy = false, MoveInProgress = false, UpdatedToken = null
            };

            try
            {
                var proxyUrl = Functions.GetAuthenticationProxyUrl();
                if (!String.IsNullOrWhiteSpace(proxyUrl) && !String.IsNullOrWhiteSpace(BaseToken))
                {
                    return(Redirect(Functions.CombineUri(proxyUrl, "BasicInfo/GetWebServerData")));
                }
                else
                {
                    data.ZoneUrl   = Request.Url.GetLeftPart(UriPartial.Authority) + Request.ApplicationPath;
                    data.ServerUrl = GetServerURI();
                }
            }
            catch (Exception ex)
            {
                data.Exception = ExceptionsML.GetExceptionML(ex);
            }

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Beispiel #2
0
    static public WebServerData load(string json)
    {
        //= JsonDataHandler.reader<WebServerData>(json);
        WebServerData data = JsonDataHandler.reader <WebServerData>(json);

        return(data);
    }