Last post Mar 05, 2019 12:02 PM by PatriceSc
Mar 05, 2019 09:19 AM|samirkarim|LINK
In this example i want to handle the authentication required popup from controller but it displayed:
var http = (HttpWebRequest)WebRequest.Create("url");
http.Credentials = new NetworkCredential("user", "pass", "domain");
var response = http.GetResponse();
Mar 05, 2019 10:39 AM|PatriceSc|LINK
Which authentication is used by this site ?
Mar 05, 2019 10:43 AM|samirkarim|LINK
It's Active Directory authentication.
Mar 05, 2019 12:02 PM|PatriceSc|LINK
You mean Windows authentication at the IIS level or a custom form using AD behing the scene to validate the user account ? In the first case https://docs.microsoft.com/en-us/dotnet/api/system.net.networkcredential?view=netframework-4.7.2 should
work (I would perhaps try against my own site it validate this). In the 2nd case you would need to POST credentials to this page so that they can process that.
Not directly related but I always find this kind of approach a bit strange. What is the purpose of having a site in between rather than having users use directly the source site ? Especially if this is not your own, it always seems quite discutable to pretend
it is your content when it is not...
If this is your own and want to achieve some goal it might be easier to expose an API doing what you need rather than trying to reuse directly HTML pages.