cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1172
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Salim Guerid on 07-09-2013 01:32:26 AM
Hi All,
I am getting the error "The request failed with HTTP status 401: Unauthorized." when posting AXL request in C# on the RisPort. The strange thing is that I have no problem using within the AXL interface with the same user, password and CUCM. I generated the RISService using the WSDL and updatd the connection as follow:
1 public RISService(string ccmIp, string user, string password)       
2{           
3System.Net.ServicePointManager.CertificatePolicy = newBruteForcePolicy();
4this.Url = "https://" + ccmIp + ":8443/realtimeservice/services/RisPort";           
5this.Credentials = new System.Net.NetworkCredential(user, password);           
6// this.SoapVersion = System.Web.Services.Protocols.SoapProtocolVersion.Soap11;       
7}
I have then added:
 1protectedoverride System.Net.WebRequest GetWebRequest(Uri uri)       
 2{           
 3System.Net.HttpWebRequest request = base.GetWebRequest(uri) as System.Net.HttpWebRequest;           
 4request.ProtocolVersion = System.Net.HttpVersion.Version10;           
 5// request.PreAuthenticate = true;
 6return request;       
 7}           
 8
 9publicclassTrustAllCertificatePolicy : System.Net.ICertificatePolicy       
10{           
11public TrustAllCertificatePolicy() { }           
12publicbool CheckValidationResult(ServicePoint sp, X509Certificate cert, WebRequest req, int problem)           
13{     
14returntrue;           
15}       
16}
The SOAP monitor is never able to check any request when opening the https://<CCMIP>:8443/realtimeservice/SOAPMonitor

Your help will be greatly appreciated.

Some doc used to troubleshoot:
http://www.cisco.com/en/US/docs/voice_ip_comm/cucm/devguide/8_0_1/serviceability.html#wp1053517
http://www.cisco.com/en/US/products/sw/voicesw/ps556/products_tech_note09186a0080a962c4.shtml

Subject: RE: C# > 401: Unauthorized
Replied by: Salim Guerid on 07-09-2013 08:57:15 AM
Ok, I was sure that was an obvious mistake...
As clearly indicated by the error code, I just needed to the add the right role to the AXL user: Standard RealtimeAndTraceCollection.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links