That's the first time I'm asking here, so, yes, if you need more information, reply here!
So, proceeding, my problem is on my .NET application that I coded for read/write information from a webservice I created and is working very well (tested on VS2013).
When I call it from a Browser, it works very well, but when I call it from my application, it returns me the error below:
The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'NTLM'
I really tried many things, and didn't find any solution for this.
My next step is just to set the auth from the AD server, so in other words, it should work from intranet only.
My Config file is:
<system.web>
<authentication mode="None" />
<compilation debug="true" targetFramework="4.5.2"/>
<httpRuntime targetFramework="4.5"/>
And my webservice routine is:
public ImportFileClass ImportFile(string FileName, string PV)
{
try
{
ImportFileClass ipt = new ImportFileClass(PV, FileName);
ipt.DoEvents();
return ipt;
}
catch (Exception ex) { throw; }
}
Thanks in advance!
I've found the mistake I was doing!
Add Service Reference On adding the service reference, I just put the URI I got on web service and then confirmed. The problem was exactly there!
I made these steps and went fine: https://www.aspsnippets.com/Articles/Call-Consume-Web-Service-ASMX-in-ASPNet-web-application-using-C-and-VBNet.aspx
By the way, thanks very much for your time! Hope it helps!