@kannan j
Apologies for the delay on this. I have been trying to reproduce this to be able to apply the remediation steps and test.
Issue: You are trying to follow the remediation steps to resolve CredSSP encyption Oracle authentication error.
This error can occur due to the following reasons. Can you please check on the following to see if any of these apply to you :
- Ensure that the file that you're trying to download isn't open or being executed at the moment. This exception will be raised if the file is in use.
- The folder for the file name/path provided for the $download should exist.
- For the WebClient.DownloadFile Method, the first parameter is a Uri address and the second parameter has to be string fileName (The name of the local file that is to receive the data.) and not a path.
Reference documentation : https://learn.microsoft.com/en-us/dotnet/api/system.net.webclient.downloadfile?view=net-6.0
Please check the above and let me know the results in the comment. Based on your answer, I can further investigate to see any other potential cause of this error.