From a146b6ebd54c88d78e2ac7ad5b8b58d21c5af324 Mon Sep 17 00:00:00 2001 From: robvde Date: Fri, 23 Nov 2012 13:24:22 +0400 Subject: [PATCH] Fixed wsp-10061 Getting error when deleting an accepted domain Occurs when OCS is enabled and no edge servers are defined --- .../Code/HostedSolution/OCSController.cs | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OCSController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OCSController.cs index 56b08755..d202ce0c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OCSController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OCSController.cs @@ -84,20 +84,23 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution private static OCSEdgeServer[] GetEdgeServers(string edgeServices) { List list = new List(); - string[] services = edgeServices.Split(';'); - foreach (string current in services) + if (!string.IsNullOrEmpty(edgeServices)) { - string[] data = current.Split(','); - try + string[] services = edgeServices.Split(';'); + foreach (string current in services) { - int serviceId = int.Parse(data[1]); - OCSEdgeServer ocs = new OCSEdgeServer(); - ServiceProviderProxy.Init(ocs, serviceId); - list.Add(ocs); - } - catch(Exception ex) - { - TaskManager.WriteError(ex); + string[] data = current.Split(','); + try + { + int serviceId = int.Parse(data[1]); + OCSEdgeServer ocs = new OCSEdgeServer(); + ServiceProviderProxy.Init(ocs, serviceId); + list.Add(ocs); + } + catch (Exception ex) + { + TaskManager.WriteError(ex); + } } }