Questions tagged [system.net]

System.Net is a namespace of the .NET framework. It provides a simple programming interface for many of the protocols used on networks today.

System.Net is a namespace of the .NET framework. It provides a simple programming interface for many of the protocols used on networks today.

References

297 questions
0
votes
1 answer

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()) { var resStr =…
0
votes
0 answers

C# How to upload any file to a fileuploader?

I need upload my file to "https://file.io" and i tried this: `private void buttonInput_Click(object sender, EventArgs e) { using (WebClient client = new WebClient()) { var resStr =…
0
votes
0 answers

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, ProtocolType.Tcp); …
0
votes
1 answer

Network port listener on c#

I'm trying to listen the active ports on my network. I tried HttpListener, but I'm not sure if this is the right listener. Any ideas or examples? using (m_listener = new HttpListener()) { m_listener.Prefixes.Add("http://*:8080/");…
HoBa
  • 3,442
  • 5
  • 26
  • 33
0
votes
0 answers

HTTP WebResponse - Read data when it is available in the ResponseStream

SO Team, I have created a Server that sends the JSON string into the TCPClient Stream, This JSON Data will be sent when the user clicks on the Mouse. For Example, for every click of the position System.Windows.Point (x,y) coordinate will be sent to…
Dheena
  • 23
  • 4
0
votes
1 answer

NetworkInformationException when adding listener to NetworkAvailabilityChanged event

We recently started seeing this exception pop up during initialization: System.Net.NetworkInformation.NetworkInformationException: An operation was attempted on something that is not a socket at…
atkretsch
  • 2,367
  • 18
  • 24
0
votes
0 answers

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 organization credentials and this website stores the details…
maisyk
  • 21
  • 4
0
votes
1 answer

Asynchronous Socket Connection

Are there any fast way to learn Asynchronous socket tcp programming or are there any libraries available to utilize system.socket in a short amount of time? My synchronous tcp client couldn't hold the program I'm working on because it needs to…
user741630
  • 23
  • 5
0
votes
1 answer

Can you download a file from an HttpContent stream from within a Windows Forms Application?

I recently developed a .NET Web App that downloaded zip files from a certain, set location on our network. I did this by retrieving the content stream and then passing it back to the View by returning the File(). Code from the .NET Web App who's…
user16768946
  • 103
  • 5
0
votes
1 answer

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 it with any PDF editor. I've tried searching…
0
votes
0 answers

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... "The underlying connection was closed: An…
liudger
  • 31
  • 7
0
votes
0 answers

Getting VM IP addresses from server physical address

I am using TNS Names to connect to Oracle DB. An entry that is used by application is using failover scenario with 3 DB IP addresses, all virtual. I am trying to get and display these DB IP addresses but when I use the host name that I get from…
NoBullMan
  • 2,032
  • 5
  • 40
  • 93
0
votes
1 answer

How do I add cookies to a webclient?

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 of what I need it to be used with. WebClient…
0
votes
1 answer

System.Web.Http problem affecting communication

It seems like there is a problem with the "System.Net.Http" dll. I keep getting all kind of errors relating to it: while trying to restore nuget packages (It seems like the framework can not connect to the nuget index: Unable to load the service…
Guy E
  • 1,775
  • 2
  • 27
  • 55
0
votes
1 answer

What values are allowed for the IsMimeMultipartContent subtype parameter

I am working on an image file upload method in Web API 2 and have noticed that the extension method IsMimeMultipartContent can take a string subtype parameter, as documented…
Daniel Thorne
  • 93
  • 2
  • 7