cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
75
Views
0
Helpful
1
Replies
Highlighted

Cannot connect to CUCM with AXLAPISERVICE .Net C# <<The request was aborted: Could not create SSL/TLS secure channel.>>

Hi to everyone,
i'm developing an application to retrive some device and device pool from a CUCM.
I have two different version of cucm, the first one has version 9.1.xx the second has 11.5.x.I made it to retrieve
information about devices and other stuff.
I'm using a c# class called AXLAPIservice.cs that i have made with the 
wsdl that i found in axltoolkit file, into schema 9.1 directory.
I made the configuration as the file readme says (attached).
All going fine when i send web requests to cucm v. 11.5.x but when i send requests to 9.1 the code throw the exception in the title.

Anyone had have this issue?

this is the code for both connection

    /// <remarks/>
    public AXLAPIService9_1(string ccmIp, string user, string password) 
	{
		System.Net.ServicePointManager.CertificatePolicy = new BruteForcePolicy();

		this.Url = "https://" + ccmIp + ":8443/axl/";
		this.Credentials = new System.Net.NetworkCredential(user, password);
	}
    
	/// <remarks/>
	public class BruteForcePolicy : System.Net.ICertificatePolicy
	{
		public bool CheckValidationResult(System.Net.ServicePoint sp, System.Security.Cryptography.X509Certificates.X509Certificate cert,
				System.Net.WebRequest request, int problem)
		{        
		return true;
		}
	}

When i try to retrieve DevicePools and use this code below to cucm 9.1 i get the exception, with 11.6 it's all ok

AXLAPIService9_1 AXL9_1 = new AXLAPIService9_1(ccm.IpAddress, ccm.Username, ccm.Password);
ListDevicePoolReq devPoolReq = new ListDevicePoolReq(); devPoolReq.searchCriteria = new ListDevicePoolReqSearchCriteria(); devPoolReq.searchCriteria.name = "%"; devPoolReq.returnedTags = new LDevicePool() { name = "", locationName = new XFkType(), physicalLocationName = new XFkType(), regionName = new XFkType(), uuid = "" }; ListDevicePoolRes devPoolRes = AXL9_1.listDevicePool(devPoolReq); LDevicePool[] listDevicePool = devPoolRes.@return;

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Cannot connect to CUCM with AXLAPISERVICE .Net C# <<The request was aborted: Could not create SSL/TLS secure channel.>>

Ok i figure it out.
The two CUCM uses two different security protocol, so i can't use the same code for both servers.

i change my code with this one

 

                if (Convert.ToInt32(ccm.Versione) <= 8)
                    ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
                else
                    ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

And everything will work well

View solution in original post

1 REPLY 1
Highlighted

Re: Cannot connect to CUCM with AXLAPISERVICE .Net C# <<The request was aborted: Could not create SSL/TLS secure channel.>>

Ok i figure it out.
The two CUCM uses two different security protocol, so i can't use the same code for both servers.

i change my code with this one

 

                if (Convert.ToInt32(ccm.Versione) <= 8)
                    ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
                else
                    ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

And everything will work well

View solution in original post

This widget could not be displayed.