Using Hixny web service for Query, Add etc - c#

Is Anyone aware of using Hixny web service "https://integration.hixny.com/csp/public/hsbus/EnsLib.IHE.PIXv3.Manager.Services.cls" for Query,Add etc.
I Tried connecting to hixny endpoints by passing the sample XML and Certificate but it is not working. Getting Error "The request was aborted: Could not create SSL/TLS secure channel"

All the request to hixny requires valid SAML headers i.e UserName and UserOrganization.
Error occured as I was passing incorrect values.

Related

Error 401 when accessing Bing News API v7 using from Unity

I would like to use UnityEngine.Networking and StartCoroutine() to retrieve data from Bing API in Unity/C#. I am getting Error 401 which is:
{"error":{"code":"401","message": "Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}
The url that I am attempting to call is:
https://[**MyEndpoint**]/bing/v7.0/news/trendingtopics?BingAPIs-Market=en-US&Ocp-Apim-Subscription-Key=[**KEY**]
I assume the reason for rejection is that I explicitly added Ocp-Apim-Subscription-Key header in the url but not sure %100.
As #jdweng indicated, you should specify your subscription key in the request header, just as below :
If it is necessary for you using the subscription key in the request URL,the param here should be subscription-key instead of Ocp-Apim-Subscription-Key just as below:
Bing API is RESTful API and expects the authentication key in the request header

The remote certificate is invalid according to the validation procedure from SSL Restful Service

I am receiving the error message, "the remote certificate is invalid according to the validation procedure", when I try to make a request. The service is being served on a Weblogic server. I have a certificate issued by the same CA and I have the root certificate plus chain along with the server's certificate.
Before I make the request, I call ServicePointManager.ServerCertificateValidationCallback and then I add the client certificate to the request. This all works but goes wrong when I try to make my request in my winform application. However, as a check, I have typed the url into the browser and it works. So,I am confused as to why I should get this error, when one the certificate has been checked, the server certificate has been validated and the client has been added to the request.
Can someone please help me?
Found the problem! The issue was due to the server certificate being issued with the incorrect distinguished name

Create Identity without CN at the certificate

I have a p12 certificate for a WebService (I've tested the certificate with SoapUI and it works, and I can access the URL with a WebBrowser).
The problem is that I can't consume the WebService with my c# development. When I try to access the webservice, returns the error message "Cannot create DNS identity probably due to the lack of CN parameter".
How can I override this? I've tried the CreateX509CertificateIdentity, but the error remains.
When you access your webservice on i.e. http://localhost/webservice url then your CN=localhost. If you want to make the webservice available at multiple urls then you need to specify all DNS addresses in subject alternative name (SAN) in the extensions of your certificate. Of course the certificate has to be trusted by client and server.

Consuming webservice from wsdl with basic authentication from asp.net

I have a WSDL file. I want to consume webservice from this WSDL. I have added service reference by using this WSDL and created proxy. I have created required parameter for invoking my service method. Actually webservice is protected by a basic authentication. But in the client proxy no option found to provide the user name and password. How could I invoke webservice?
I want to provide basic authentication credentials.
I am getting the following error when invoking service method without giving credentials.
System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.
Please help me
Try this:
client.ClientCredentials.UserName.UserName = "xxxxxx";
client.ClientCredentials.UserName.Password = "xxxxx";
https://msdn.microsoft.com/en-us/LIbrary/ms733775.aspx

Cannot consume webservice over ssl

I am trying to consume webservice over https protocol. I have password-protected p12 file with certificate. After importing this file I can view service methods over browser and I can add service as a ServiceReference in VisualStudio client application. Problem appears while invoking methods of this service. I tried almost everything and still get error 'Could not establish secure channel for SSL/TLS with authority {server_name}'.
What can be wrong?
There are at least few possible causes but I would start by redefining the certificate validation callback:
ServicePointManager.ServerCertificateValidationCallback = (a,b,c,d) => true;
Put this like in your client code before you access the service.

Categories

Resources