I have a basic ASMX service that I am trying to start (I would prefer to use WCF, but I cannot get the server to work with it). It works great in security settings, but as soon as I turn on protection, I get:
The HTTP request is not authorized using the Anonymous client authentication scheme. The authentication header received from the server was "Basic realm =" Secure Area ".
What I want is a minimalistic user request for a username and password.
Washing code with intellisense will not come up with anything like me.
It looks like it might be useful, but it looks like it is a WCF that knows.
I just realized that I can do this live demo:
here is the service: http://smplsite.com/sandbox3/Service1.asmx
The username is testapp , and the password is testpw . I need a command line application that calls the functions of this service.
If I added security, this line worked in the VS base project after running the Add Web Service Reference at this URL
new ServiceReference1.Service1SoapClient().HelloMom("Bob");
This is my current attempt (this does not work)
class Program { private static bool customValidation(object s, X509Certificate c, X509Chain ch, SslPolicyErrors e) { return true } static void Main(string[] args) {
Edit: BTW is not a website or works in a browser, access code is a command line application in C #. In addition, authentication is performed by another IIS plug-in, which I do not control.
Edit 2: be clear; The solution I'm looking for is a purely client problem.
Edit 3: Access control is done through a system such as .haccess , and I like it. I do not want the service code to authenticate.