A component of ASP.NET for creating RESTful web services that support HTTP-based communication between clients and servers.
Hi @39662036,
If you receive an access denied when calling a Web service with anonymous authentication turned off, you can use the following method.
Resolution 1: Assign DefaultCredentials to Credentials property
Resolution 2: Use the CredentialCache class
If http works, but https doesn't, you need to check your TLS version.
The default version of the .NET Framework 4.5 is TLSv1. However, TLS 1.0 and 1.1 have been deprecated. So you have to explicitly set the security protocol, rather than having .NET or the operating system choose the security protocol.
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
For more information, please visit:
Transport Layer Security (TLS) best practices with .NET Framework
Best regards,
Lan Huang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread