inject Cookies to AngleSharp
See original GitHub issueI need AngleSharp read a cookie session to get open a secure website, i try this but it is not working.
req.Credentials = new NetworkCredential("user", "pass","domain");
var response = (HttpWebResponse)request.GetResponse();
var statusCode = response.StatusCode;
if (statusCode == HttpStatusCode.OK)
{
var configuration = Configuration.Default.WithCookies().WithDefaultLoader();
var context = BrowsingContext.New(configuration);
await context.OpenAsync(url);
}
But i obtain 401(not authorised) from server. How can i achieve this?
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Adding a cookie to DocumentRequest - anglesharp
I think there are two potential ways to solve this. either use document.Cookie for setting a new cookie (would require an active document ......
Read more >How to use cookies in AngleSharp? : r/csharp
I got my cookies from Chrome (by running the JavaScript code `document.cookie`). How to use this cookie string in AngleSharp?
Read more >How to set Cookies from AngleSharp into WebClient ...
Hey, I have to download some .exe Files from a server but as I have read, anglesharp is not able to do this....
Read more >Programmatic web page login with cookies - Damir's Corner
If a site requires you to include hidden fields from the login page, you need to request that page first and parse the...
Read more >AngleSharp.Io 1.0.0
AngleSharp.Io extends AngleSharp with powerful requesters, caching mechanisms, and storage systems. It is coupled more strongly to the underlying operating ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
WithRequesters is an extension in AngleSharp.Io package.
THNX, but unfortunately it’s supporting only net45 now. I hope it’ll be fixed soon - https://github.com/AngleSharp/AngleSharp.Io/issues/9