none
OCS 2007 r2 VOIP Profile location RRS feed

  • Question

  • hi all

    i am trying to create VOIP  location profile  through WMI  , but when i execute the code  it give COmException  with Error Code -1007911679

    Script on C#

      ManagementClass ClassRef = new ManagementClass(@"root\cimv2", "MSFT_SIPLocationProfileData", null);

                    ManagementObject LocationProfileData = ClassRef.CreateInstance();
                    string[] NormalizationRules = new string[] { GET_NORMALIZATION_RULE(RuleName) };
                    LocationProfileData["Description"] = "TestProfile";
                    LocationProfileData["ExternalAccessPrefix"] = false;
                    LocationProfileData["InstanceID"] = "{"+System.Guid.NewGuid().ToString()+"}";
                    LocationProfileData["Name"] = "ProfileName";
                    LocationProfileData["NormalizationRules"] = NormalizationRules;
                    LocationProfileData["OptimizeDeviceDialing"] =false;
                    LocationProfileData["ProfileDN"] ="LocProfDN" ;
                    LocationProfileData["TrustedServerReference"] = GET_TRUSTED_REFRENCE();
                    LocationProfileData.Put();   /// COMException  Error code -1007911679  no error massage
                    LocationProfileData.Dispose();

    help rquired 

    Friday, January 29, 2010 6:16 AM