How to pass Umbraco user credentials via HttpWebRequest
I have an application from which I want to make an authenticated call to a backoffice page. More specifically, I want to trigger an Import via Usync. However, to do that, I must pass some user credentials with my call.
In the above example, I pass the username and password of a backoffice via the Network Credentials class. Needless to say, it doesn't work with my Umbracosite returning a 405, method not allowed exception.
What's the best practice for making an authenticated call to a backoffice page? Do I need to fetch a cookie by first doing a post to the logon page or something of the like?
If anyone could provide some code samples, I'd be very grateful!
How to pass Umbraco user credentials via HttpWebRequest
I have an application from which I want to make an authenticated call to a backoffice page. More specifically, I want to trigger an Import via Usync. However, to do that, I must pass some user credentials with my call.
In the above example, I pass the username and password of a backoffice via the Network Credentials class. Needless to say, it doesn't work with my Umbracosite returning a 405, method not allowed exception.
What's the best practice for making an authenticated call to a backoffice page? Do I need to fetch a cookie by first doing a post to the logon page or something of the like?
If anyone could provide some code samples, I'd be very grateful!
Thanks in advance!
is working on a reply...