I have searched "ASP.NET authentication from a Windows Forms application" on google, but the results are "Windows Authentication using ASP.NET" which is not what I am looking for.
Scenario:
I have an ASP.NET application and a set of WCF services what provide data to the application via AJAX calls. These WCF services require ASP.NET authentication, which is fine from the browser because there is a cookie which provides the authentication information, or asks the user to authenticate via a login page.
I need to call these services from a Windows Forms application, without changing the way they work. i.e. The Windows Forms application will receive the JSON data from the service and process it.
Problem:
I need to be authenticated before I can use the WCF services, but as this is not a web application, there is no cookie, and the login page cannot be displayed!
Question:
How do I provide authentication from a Windows Forms application to an ASP.NET web application?