I am new to .Net Core 2 and having problems trying to access Azure AD with a fresh .Net Core 2 Visual Studio 2017 MVC web app.
I am getting
HttpRequestException: Response status code does not indicate success: 407 (Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )).
Which basically means that our corporate proxy server is not receiving the credentials needed to pass through ISA server.
As we have no control over our corporate proxy server, its always been up to our apps to supply the correct credentials that ISA needed. With ASP.Net its been just a matter of adding the following to app.config or web.config
<system.net><defaultProxy useDefaultCredentials="true" /></system.net>
I have proven, by running the equivalent non core version of the application, that this workaround should fix the problem.
However, with .Net Core 2, we have not found a way to implement this, either via config file, or programatically, ie in middleware say via WebProxy class/IWebProxy Interface, the latter has been tried but had no success.
How do we tell an .Net Core 2 MVC application to use default credentials when accessing the web?
Many thanks