Comments (6)
Hm bit of a strange thing. You post it here, but you did in fact use the DefaultHttpRequester
, which is the one from AngleSharp
. Are you sure you did not intend to use the HttpClientRequester
?
Regarding the question: Potentially the CA verification fails. I'd recommend disabling HTTPS verification to see if this is the issue.
Related:
https://social.msdn.microsoft.com/Forums/en-US/2d5e64ca-e9af-402e-8852-dc4b70dc3c5f/http-post-request-gt-getresponse-hangs?forum=netfxnetcom
https://stackoverflow.com/questions/48969650/https-request-fails-only-in-net-web-app
https://stackoverflow.com/questions/42746190/https-request-fails-using-httpclient
from anglesharp.io.
You post it here, but you did in fact use the
DefaultHttpRequester
, which is the one fromAngleSharp
. Are you sure you did not intend to use theHttpClientRequester
?
What is HttpClientRequester
? I don't see this class in AngleSharp. DefaultHttpRequester
is from AngleSharp.Io
.
Regarding the question: Potentially the CA verification fails. I'd recommend disabling HTTPS verification to see if this is the issue.
It may be true (haven't checked yet), but why removing Form creating solves this problem (with absolute repeatability)?
from anglesharp.io.
What is HttpClientRequester? I don't see this class in AngleSharp. DefaultHttpRequester is from AngleSharp.Io.
You confuse a namespace with a library. The AngleSharp.Io
namespace is already in AngleSharp
, but this is the AngleSharp.Io
library, which brings more requesters such as
It may be true (haven't checked yet), but why removing Form creating solves this problem (with absolute repeatability)?
Not sure what you refer to. You may run into a deadlock here, but again - from the description you focus on an HTTPS problem. Maybe first check there.
from anglesharp.io.
Not sure what you refer to.
Exactly what I wroted: see steps 1-4 you can reproduce.
I added
ServicePointManager.SecurityProtocol |=
SecurityProtocolType.Tls12 |
SecurityProtocolType.Tls11 |
SecurityProtocolType.Tls;
to the start of my code, but it didn't solve my problem. I also tried use HttpClientRequester
and have exactly same behavior.
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Accept-Language", "en-US,en;q=0.812");
var requester = new HttpClientRequester(client);
var config = Configuration.Default.WithRequester(requester).WithDefaultLoader();
var context = BrowsingContext.New(config);
var document = await context.OpenAsync(urlAddress);
I also checked the document
– response is empty if remove "https://". (I updated the example project)
The only way to get any responce from it is to remove any Froms creating before executing OpenAsync
from anglesharp.io.
The thing runs. As written you may run into a deadlock - I'd suggest to ConfigureAwait(false)
or similar. In any case this does not seem like a problem with the requester or AngleSharp itself.
from anglesharp.io.
The thing runs. As written you may run into a deadlock - I'd suggest to
ConfigureAwait(false)
or similar. In any case this does not seem like a problem with the requester or AngleSharp itself.
This thing runs. Until you execute Form initialisation as I wroted in reproduction steps
ConfigureAwait(false)
fixed it, thanks!
from anglesharp.io.
Related Issues (20)
- Add FTP requester
- Add File requester
- .NET Core build HOT 1
- About scheme
- Documentation HOT 1
- Introduce improved cookie container HOT 1
- IRequester example HOT 3
- HttpClientRequester does not use HttpClientHandler.AllowAutoRedirect HOT 2
- Binary data restore when opening an image url HOT 3
- Support .net standard 1.3 and .net46 HOT 3
- A connection attempt failed HOT 3
- Unhandle exception crash the application HOT 2
- How to use both Proxy and Headers in AngleSharp.Io HOT 1
- Missing AngleSharp.Io.Network namespace in 0.16.0 nuget package HOT 2
- Request for Support / Sponsorship
- Doesn't handle cookies where the Domain starts with a dot. HOT 7
- Implement WebSocket interface HOT 1
- TypeLoadException when using AngleSharp.Io with AngleSharp 0.9.4 HOT 6
- Portable AngleSharp.Io? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anglesharp.io.