private static void ConfigureProxyManager()

in RESTProxy/App_Start/WebApiConfig.cs [102:121]


        private static void ConfigureProxyManager()
        {
            // DEBUGGING NOTE: When debugging the RESTProxy service directly (not using the
            // AzureService project), it won't be reading the values from your ServiceConfiguration
            // files, so these two values will come back empty.  You'll need to temporarily modify
            // this code and directly set the values for defaultTenantId and configJson.
            // When doing that, you'll need to replace any " with \".
            // Also keep in mind that in that scenario, you won't have access to the encryption
            // certificate stored in Azure, so you'll need to modify your EndpointJsonConfig by
            // changing clientSecretEncrypted to the *unencrypted* values and clearing out the
            // values for the clientSecretCertificateThumbprints.
            string defaultTenantId = CloudConfigurationManager.GetSetting("DefaultTenantId");
            string configJson = CloudConfigurationManager.GetSetting("EndpointJsonConfig");

            if (!string.IsNullOrWhiteSpace(configJson))
            {
                List<Endpoint> endpoints = JsonConvert.DeserializeObject<List<Endpoint>>(configJson);
                Models.ProxyManager.Configure(endpoints, defaultTenantId);
            }
        }