Fixed wsp-10061 Getting error when deleting an accepted domain

Occurs when OCS is enabled and no edge servers are defined
This commit is contained in:
robvde 2012-11-23 13:24:22 +04:00
parent ca22d3927b
commit a146b6ebd5

View file

@ -84,20 +84,23 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
private static OCSEdgeServer[] GetEdgeServers(string edgeServices) private static OCSEdgeServer[] GetEdgeServers(string edgeServices)
{ {
List<OCSEdgeServer> list = new List<OCSEdgeServer>(); List<OCSEdgeServer> list = new List<OCSEdgeServer>();
string[] services = edgeServices.Split(';'); if (!string.IsNullOrEmpty(edgeServices))
foreach (string current in services)
{ {
string[] data = current.Split(','); string[] services = edgeServices.Split(';');
try foreach (string current in services)
{ {
int serviceId = int.Parse(data[1]); string[] data = current.Split(',');
OCSEdgeServer ocs = new OCSEdgeServer(); try
ServiceProviderProxy.Init(ocs, serviceId); {
list.Add(ocs); int serviceId = int.Parse(data[1]);
} OCSEdgeServer ocs = new OCSEdgeServer();
catch(Exception ex) ServiceProviderProxy.Init(ocs, serviceId);
{ list.Add(ocs);
TaskManager.WriteError(ex); }
catch (Exception ex)
{
TaskManager.WriteError(ex);
}
} }
} }