automate getting html from Windows Authentication secured site
Hello!
There’s this application that is managed via a web portal http://localhost/appname/admin
Site is hosted on IIS. The page requires authentication. IIS Authentication settings are as follows: Windows Authentication “Enabled”, Basic Authentication “Disabled”, ASP.NET Impersonalisation “Disabled”, Anonymous Authentication “Enabled”.
Once I login into the system using an AD account, I can browse the portal and get some data. The aim is to automate getting a data from about 1k pages via either powershell or C# code. The problem is that I can not get through the authentication page.
I’m thinking 2 ways. 1. to authenticate in the code itself, 2. to use already established by browser session. But with almost zero experience, I’m stuck. Would someone suggest a way to handle the situation