Fixed lync object index range exceeded and missing tenant ID
This commit is contained in:
parent
5193588f18
commit
34543153b5
2 changed files with 39 additions and 29 deletions
|
@ -229,6 +229,34 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
|||
}
|
||||
}
|
||||
|
||||
if (lync.GetOrganizationTenantId(org.OrganizationId) == string.Empty)
|
||||
{
|
||||
PackageContext cntx = PackageController.GetPackageContext(org.PackageId);
|
||||
|
||||
org.LyncTenantId = lync.CreateOrganization(org.OrganizationId,
|
||||
org.DefaultDomain,
|
||||
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue),
|
||||
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ALLOWVIDEO].QuotaAllocatedValue),
|
||||
Convert.ToInt32(cntx.Quotas[Quotas.LYNC_MAXPARTICIPANTS].QuotaAllocatedValue),
|
||||
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_FEDERATION].QuotaAllocatedValue),
|
||||
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ENTERPRISEVOICE].QuotaAllocatedValue));
|
||||
|
||||
if (string.IsNullOrEmpty(org.LyncTenantId))
|
||||
{
|
||||
TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ENABLE_ORG);
|
||||
return res;
|
||||
}
|
||||
else
|
||||
{
|
||||
PackageController.UpdatePackageItem(org);
|
||||
|
||||
bReloadConfiguration = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
LyncUserPlan plan = GetLyncUserPlan(itemId, lyncUserPlanId);
|
||||
|
||||
if (!lync.CreateUser(org.OrganizationId, user.UserPrincipalName, plan))
|
||||
|
|
|
@ -38,10 +38,10 @@
|
|||
|
||||
//
|
||||
// This source code was auto-generated by wsdl, Version=2.0.50727.42.
|
||||
//
|
||||
//
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
|
||||
|
||||
|
||||
namespace WebsitePanel.Providers.Lync {
|
||||
using System.Xml.Serialization;
|
||||
using System.Web.Services;
|
||||
|
@ -88,7 +88,7 @@ namespace WebsitePanel.Providers.Lync {
|
|||
|
||||
/// <remarks/>
|
||||
public LyncServer() {
|
||||
this.Url = "http://localhost:9004/LyncServer.asmx";
|
||||
this.Url = "http://localhost:9003/LyncServer.asmx";
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
|
@ -193,28 +193,16 @@ namespace WebsitePanel.Providers.Lync {
|
|||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetOrganizationTenantId", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public string GetOrganizationTenantId(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice) {
|
||||
public string GetOrganizationTenantId(string organizationId) {
|
||||
object[] results = this.Invoke("GetOrganizationTenantId", new object[] {
|
||||
organizationId,
|
||||
sipDomain,
|
||||
enableConferencing,
|
||||
enableConferencingVideo,
|
||||
maxConferenceSize,
|
||||
enabledFederation,
|
||||
enabledEnterpriseVoice});
|
||||
organizationId});
|
||||
return ((string)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginGetOrganizationTenantId(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice, System.AsyncCallback callback, object asyncState) {
|
||||
public System.IAsyncResult BeginGetOrganizationTenantId(string organizationId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("GetOrganizationTenantId", new object[] {
|
||||
organizationId,
|
||||
sipDomain,
|
||||
enableConferencing,
|
||||
enableConferencingVideo,
|
||||
maxConferenceSize,
|
||||
enabledFederation,
|
||||
enabledEnterpriseVoice}, callback, asyncState);
|
||||
organizationId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
|
@ -224,23 +212,17 @@ namespace WebsitePanel.Providers.Lync {
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetOrganizationTenantIdAsync(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice) {
|
||||
this.GetOrganizationTenantIdAsync(organizationId, sipDomain, enableConferencing, enableConferencingVideo, maxConferenceSize, enabledFederation, enabledEnterpriseVoice, null);
|
||||
public void GetOrganizationTenantIdAsync(string organizationId) {
|
||||
this.GetOrganizationTenantIdAsync(organizationId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetOrganizationTenantIdAsync(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice, object userState) {
|
||||
public void GetOrganizationTenantIdAsync(string organizationId, object userState) {
|
||||
if ((this.GetOrganizationTenantIdOperationCompleted == null)) {
|
||||
this.GetOrganizationTenantIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationTenantIdOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("GetOrganizationTenantId", new object[] {
|
||||
organizationId,
|
||||
sipDomain,
|
||||
enableConferencing,
|
||||
enableConferencingVideo,
|
||||
maxConferenceSize,
|
||||
enabledFederation,
|
||||
enabledEnterpriseVoice}, this.GetOrganizationTenantIdOperationCompleted, userState);
|
||||
organizationId}, this.GetOrganizationTenantIdOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnGetOrganizationTenantIdOperationCompleted(object arg) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue