301 questions
1
vote
1
answer
105
views
Getting content of URL using Invoke-WebRequest or System.Net.WebClient
I'm trying to get the content of https://www.migdal.co.il/about/investments/assets using PowerShell.
I've tried either:
Invoke-WebRequest -Uri "https://www.migdal.co.il/assets" -Method Get
...
0
votes
1
answer
61
views
Can't load System.Net.WebHeaderCollection
.net 6.0 project, it throw the exception can't find a dll version 6.
this is the error:
System.AggregateException: One or more errors occurred. (Could not load file or assembly 'System.Net....
0
votes
1
answer
248
views
Attaching a attachment to a calendar event using powershell
I am creating a calendar event using powershell. Ideally, I'd like to avoid using modules if possible because I feel like what I'm trying to do is very possible with what I have, but if a module is my ...
0
votes
1
answer
316
views
intellij IDEA + System.Net.Http.Formatting + issue to run function CLI command from staging folder
I am working with Azure Functions app in intellij idea. From Yesterday I am struggling with following issue :
[2023-10-05T12:18:02.170Z] A host error has occurred during startup operation '7ab97efe-...
0
votes
0
answers
76
views
ServicePointManager not initialised when in CLR class library?
I've inherited a CLR class library (.NET Framework 4.7.2) that provides a function which queries table storage in Azure. The function, called from a native C++ executable, is currently failing because ...
0
votes
1
answer
630
views
How to get Local Router Address[Not IPV4 address of device] in Xamarin
I have tried below code but it keeps on giving the me iPhone(ie.Device) IP Address. But I want to get a ROUTER IP ADDRESS
public string GetIPAddress()
{
String ipAddress = "";
...
0
votes
1
answer
156
views
How to create new ServerSocket C#
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Net.Sockets;
namespace PowerCarsMobileServer
{
class Server
{
public static int Port { ...
1
vote
0
answers
30
views
System.Net library is limiting outgoing requests to only two threads [duplicate]
I am working on old project, and I found weird problem, which I am not able to explain.
It is about communication from my client app to server app.
Server is running under IIS app pool and client is ...
0
votes
1
answer
1k
views
C# How to send a file to webhook and get sent file's link?
Hello im trying upload file to a link and i tried this:
`private void buttonInput_Click(object sender, EventArgs e)
{
try
{
using (WebClient client = new WebClient())
...
3
votes
3
answers
5k
views
How to improve slow DNS with HttpClient?
I have one request for a specific domain that take a really long time to complete : 22 seconds in average. The request itself does not return a lot of data.
var httpClient = new HttpClient(); //...
0
votes
0
answers
1k
views
Getting socket exception on 127.0.0.1 (error code 10049) C#
{
ipAddress = IPAddress.Parse("127.0.0.1");
remoteEndPoint = new IPEndPoint(ipAddress, portAddress);
socket = new Socket(ipAddress.AddressFamily, SocketType.Stream, ...
0
votes
0
answers
85
views
System.Net URL call not returning the expected HTML response
I am trying to query a website to scrape some information for my organization, this information is sat behind a login page which for now I am bypassing by logging into the browser using my ...
0
votes
1
answer
655
views
Decoding and encoding PDF to send through FTP
Hello there fellow programmers!
I have an issue with sending PDF through FTP. I want to copy propely created PDF to FTP directory, unfortunately file i send through has proper size but i cannot open ...
0
votes
0
answers
2k
views
C# WebClient: The underlying connection was closed: An unexpected error occurred on a receive
I'm sorry for reposting this question. Just couldn't find an answer that was working for me.
Problem
This error occurs with Louis Vuitton's website but not with for example a specific ebay listing...
&...
0
votes
1
answer
4k
views
How do I add cookies to a webclient? [duplicate]
So I was looking for an answer and everything I've looked for hasn't worked.
I'm using WinForms with .NET Framework 4.8
I'm very confused as to this. Anyone able to help?
Code below is just an example ...
1
vote
0
answers
62
views
IPEndPointCollection missing under System.Net
(If this is a dumb question I apologies for it, but I'm new to C# language).
I'm creating a P2P system in C# with Visual Studio 2019 and I need the IPEndPointCollection class, but I don't find it ...
2
votes
1
answer
655
views
C# .Net Core 3.1: Having difficulty using System.Net.IPAddress byte order swapping
Sorry to ask about what should be a simple thing, but I've been trying to use IPAddress.NetworkToHostOrder and IPAddress.HostToNetworkOrder to no avail. I'm on Windows rig, little endian. Here's tiny ...
1
vote
0
answers
135
views
Game-Server running on local machine but not on ubuntu server
My Server (System.Net) is working on my local mashine (win10), but not on the ubuntu server, i get this error:
Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of ...
0
votes
1
answer
258
views
No connection could be made because the target machine actively refused it - TCP
I need help with my situation. Erorr is "No connection could be made because the target machine actively refused it" when run client.Connect(). Thank you!
private void btnSend_Click(object sender, ...
2
votes
0
answers
228
views
What is the relationship between ServicePointManager.DefaultConnectionLimit and system.net connectionManagement maxconnection?
Do these two settings refer to the same limit or seperate limits? (don't fixate on the number, I put that in at random)
System.Net.ServicePointManager.DefaultConnectionLimit = 20;
The above property ...
3
votes
2
answers
6k
views
MemoryStream from HttpContent without copying
I m trying to use System.Net.Http for POST requests. I m ok with HTTP response body being in memory but need to obtain MemoryStream for it. One way to do that would be to call HttpContent....
0
votes
0
answers
587
views
System.TypeLoadException : Could not load type System.Net.HttpStatusCode, netstandard, while decoding custom attribute: (null)
The problem occurs between a Xamarin.IOS type project and a .NetStandard2.0 library. I have created a small solution (link here) demonstrating the problem. To achieve this, the Xamarin project uses ...
7
votes
4
answers
3k
views
Using "System.Net.Dns.GetHostEntry()" to get the IP address for a website, will give different results compared to some online IP checker sites
I am working on a c# console application, and inside my console application, i have the following code, to get the IP for a website:-
using System.Net
using System.Web;
using System.IO;
namespace ...
0
votes
0
answers
85
views
Twitter Search API returns null Object
I have been using the Tweetinvi library to search tweets(.NET 4.7.2) for my application. Till last week the application worked fine without issues. Recently I have noticed that the application would ...
0
votes
0
answers
77
views
Is it possible to get a list of IPEndPoints on a remote pc on my network using c#
As the title suggests, I'd like to know if it's possible to get a list of System.Net.IPEndPoint on a remote server.
I know this can be done on a local machine using ipGlobalProperties....