Getting error after consuming WSDL service in asp.net core application - asp.net-core

When I am trying to call function in Wsdl service.i am getting error ' The http request is unauthorized with client authentication scheme 'Anonymous '.The authentication header received from the server was 'Basic realm="",Bearer realm="".
Can you please help to fix this issue?
The security mode is transport in reference.cs file

Related

Akana API gateway is not working for secured SOAP services

In Akana API Gateway, I am trying to setup a Proxy API for invoking SOAP service which is Secured(BASIC Authentication). When I tried to invoke the Proxy API from Test Client, it is not invoking the Target service.
It is showing the 503 service unavailable Error. However, It is working fine when I invoke the target service from SOAP UI.(I passed BASIC Authentication credential in SOAP UI)
I even tried, invoking the Proxy API from SOAP UI and passed the BASIC Authentication credential. Still I get the same error. ie., 503 service unavailable Error
Here is the error details
Cause: Binding component error encountered. HTTP Error [503:Service Unavailable] when accessing the URI [http://url]
Could any one please help.
I managed to resolve this issue.
It was due to the incorrect Protocol. The WSDL URL is HTTPS. After importing the WSDL, the auto generated operation endpoint has HTTP.
After modifying the endpoint URL manually from HTTP to HTTPs, it worked.

How can my UWP app authenticate with a WCF service?

I'm writing an UWP app in C#, and I'm trying to have it consume data from a (pre-existing) WCF service. I can't find any information online on the subject. Here is what my code looks like (WCF service is Serv, service namespace is Ns):
var config = Ns.ServClient.EndpointConfiguration.BasicHttpBinding_IServ;
var client = new Ns.ServClient(config);
var result = client.TestCall();
I get the following exception, which I don't understand how to parse:
Exception thrown:
'System.ServiceModel.Security.MessageSecurityException' in
mscorlib.ni.dll
Additional information: The HTTP request is unauthorized with client
authentication scheme 'Negotiate'. The authentication header received
from the server was 'Negotiate, NTLM'.
What does this error message mean? And how do I successfully authenticate with the WCF service?
Bonus question: what is the ServiceReferences.Designer.ClientConfig file? How do I use it?
I opened the Package.appxmanifest file and added the Enterprise Authentication and Private Networks (Client & Server) capabilities. This fixed the issue.

WCF Test client and authentication

I'm trying to call a webservice with WCF Test Client but the webservice requires authentication.
How do I log on and call it by WCF Test Client (I tried to get it from browsers and then to call but does not work). I could use SOAP UI, but I'd like to do it with WCF Test Client if is possible. Maybe changing WCF config?
Error: Cannot obtain Metadata from If this is a Windows (R)
Communication Foundation service to which you have access, please
check that you have enabled metadata publishing at the specified
address. For help enabling metadata publishing, please refer to the
MSDN documentation at
http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange
Error URI: Metadata contains a reference that cannot be
resolved: ''. The HTTP request is unauthorized with client
authentication scheme 'Anonymous'. The authentication header received
from the server was 'Basic realm=""'. The remote server
returned an error: (401) Unauthorized.HTTP GET Error URI:
There was an error downloading ''. The request failed with
HTTP status 401: Unauthorized.
Do you have a mex endpoint specified in your config?
If you're having setup issues I'd suggest reading through the Codeplex applications scenarios to ensure you have setup your service and WCF Test Client properly.
Please post configs and some sample code if you require any further help.
EDIT:
These links may provide some insight in to the issue:
WCF - Cannot obtain Metadata, but works when the XML Endpoint is removed?
Cannot obtain Metadata from WCF service when using Microsoft WCF Test Client.

HTTP Errors while consuming non-WCF Web Service using a WCF Client

I am trying to consume a third party web service, which is developed not in .NET but in some other langauge (may be in Java). I am trying to consume the service from WCF Client. But while adding Service reference it is throwing a error:
The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'basic realm="EXTRACT-CREDENTIAL"'.
Also when I am hitting the service URL in a browser it's throwing an error as follows:
HTTP GET Requests are not supported by the broker. Please use HTTP POST instead
What could be the way to consume the service from WCF client?

WCF-BasicHttp NTLM ESB guidance

I am trying to access an asmx service located on IIS, the asmx is using integradted security
I am trying to call it with wcf-basichttp adapter configured inside ESB guidance 1.0
The error i am getting is :
The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'NTLM'
I tryed to set in the endpoint config:
UserName=DOMAIN\Username&Password=Password&TransportClientCredentialType=NTLM
Any idea would be appriciated
I would take a look at this similar thread.