Click here to Skip to main content
15,886,963 members

Comments by LiQuick (Top 9 by date)

LiQuick 13-Jan-22 19:04pm View    
When i do "var adapters = await WiFiAdapter.FindAllAdaptersAsync();" multiple times I get the following error: "An attempt was made to establish a session to a network server, but there are already too many sessions established to that server. (Exception from HRESULT: 0x800704C4)". Any idea how i can avoid this error? I need to scan multiple times (making a wifi heatmapper application).
LiQuick 19-Feb-19 4:04am View    
PS. Today at work (yesterday I was at home) a part of the data that was different between direct request and proxy request are the same. This makes me more stressed.
LiQuick 19-Feb-19 3:24am View    
Hi Derek,
Thx for your suggestions. When I visit my proxy, Chrome wil send the below (I have removed a few to be brief) headers. So yes the browser will send multiple possible content types it can handle.
Request Accept : text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Request Accept-Encoding : gzip, deflate, br
Request Accept-Language : nl-NL,nl;q=0.9,en;q=0.8,en-US;q=0.7
Request User-Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36

I have copied these headers into the HttpRequestMessage so it will mimic the browser request:
System.Net.Http.HttpRequestMessage
Version : 1.1
Content : NULL
Method : GET
RequestUri : https://services.odata.org/V4/Northwind/Northwind.svc/Customers
Headers : Connection: Keep-Alive
Accept: text/html, application/xhtml+xml, application/xml; q=0.9, image/webp, image/apng, */*; q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: nl-NL, nl; q=0.9, en; q=0.8, en-US; q=0.7
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36
Upgrade-Insecure-Requests: 1

So in my point of view their should be no difference between a direct request to the OData service and through my HttpClient. I'll try to sniff out, as you recommended the difference between my proxy and the webbrowser.

Thx
LiQuick 10-Sep-15 18:02pm View    
I have "solved" the problem, I forgot to Transform the startpoint of the figure and only transformed the segments. I have put the full transform code above in the question. Many many thx for your help Dan. Hope I'll be able to return the favor in the future.
LiQuick 10-Sep-15 3:02am View    
Dear Dan,
Thanks for your code I have learned a lot of new things from your code (yield, using extension with the 'this' keyword in the method arguments) I wished you were seated next to me I could learn so much from you!
I have tried to implement your code and I have booked some success but I'm still working on one problem with PolyBezierSegments as you can see in the below screenshots:
https://www.dropbox.com/s/6ocb17cg3pr5r2m/WPFTransform-1.png?dl=0
https://www.dropbox.com/s/b4r5go6s0fd9enz/WPFTransform-2.png?dl=0

Best regards,
Rémy

PS. Avatar is a test program I've build to make a vector drawing program.... Yes your sublime code is used in a simple drawing program.