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
3
votes
1 answer

Simple HttpClient test failing on Mono

When executing this simple little test on Mono (3.2.1) on Mac OS X it never prints any response to the console but instead says Shutting down finalizer thread timed out. Is there something wrong with this code or is my Mono misbehaving? using…
Piotr Zurek
  • 2,800
  • 2
  • 24
  • 32
3
votes
2 answers

getting "remote server cannot be resolved" on localhost does not get fixed by defaultProxy?

here is the sitution, i am testing on my localhost from my machine at home (no proxy server and windows default firewall) and retrieving api.flickr.com xml file, when I come to work (that uses an ISA server to connect) I get "remote server could not…
Ayyash
  • 4,257
  • 9
  • 39
  • 58
3
votes
1 answer

MvvmCross Portable Class Library - System.Net.ServicePointManager

In my PCL I am trying to call to an SSL service so I am trying to set ServerCertificateValidationCallback like so: System.Net.ServicePointManager.ServerCertificateValidationCallback = ValidateServerCertficate; but it seems I can't add a reference…
Chris Hawkins
  • 808
  • 1
  • 7
  • 22
3
votes
1 answer

Is there a way I can tell whether an SMTP server is expecting a client to connect using "implicit" SSL versus "explicit" SSL?

SSL can either be "explicit" or "implicit" as explained by this link: http://help.globalscape.com/help/secureserver2/Explicit_versus_implicit_SS.htm System.Net.Mail only support "explicit" SSL, as explained…
Corey Trager
  • 22,649
  • 18
  • 83
  • 121
3
votes
2 answers

http connection reuse

I would like to better understand how .Net http connection reuse works. When I use HttpWebRequest to send something to some server twice from the same appdomain, is the connection (optionally) reused? So the server would see both requests as coming…
Yaron Naveh
  • 23,560
  • 32
  • 103
  • 158
3
votes
1 answer

Very weird spontaneous disconnect for a System.Net socket

I have a System.Net socket that's spontaneously disconnecting, especially if I query its state TWICE in the Visual Studio 2010 debugger. It's instantiated like this: _TCPConn = new Socket(AddressFamily.InterNetwork, SocketType.Stream,…
user316117
  • 7,971
  • 20
  • 83
  • 158
3
votes
1 answer

Using C# to efficiently pull data from a webpage with changing sourcecode?

I have already put together code using the System.net.Webclient class to pull source code from a webpage, which I then use a string search on, to get specific information. This in itself works fine, but my issue is that the source code changes every…
Ari
  • 3,489
  • 5
  • 26
  • 47
3
votes
4 answers

How can I rate limit an upload using TcpClient?

I'm writing a utility that will be uploading a bunch of files, and would like to provide the option to rate limit uploads. What is the best approach for rate limiting uploads when using the TcpClient class? My first instinct is to call…
Luke
  • 18,585
  • 24
  • 87
  • 110
2
votes
3 answers

using httpListener to create custom website with URL as my IP-Address

I want to create a website with URL as my IP-address[ex: 192.X.X.X] That website would respond with a "HELLO THERE" message to any user who accesses my URL. I use the following code to do this![its just a basic code with no threading] class…
Anirudha
  • 32,393
  • 7
  • 68
  • 89
2
votes
2 answers

"System.Net.Sockets.Socket does not contain a definition for 'SendTo'"

I'm trying to make a basic client-server application for windows phone 7 (using Mango 7.1). At the moment I just have the sample code from MSDN (here: http://msdn.microsoft.com/en-us/library/tst0kwb1.aspx) for a UDP client pasted into a method in…
2
votes
3 answers

Which local ip connects to a remote ip?

Im sorry if this been asked before, but couldnt find anything about this particular matter. I try to find out with which of my own ip's my computer use to connect to a remote ip. I use some kind of socket setup both ways etc, and im sending my ip…
Erik Karlsson
  • 570
  • 1
  • 6
  • 17
2
votes
2 answers

VB.Net SerialPort reads are returning fragmented sets of data

The Problem I have a USB device which creates a Virtual Serial Port on Windows. I am using VB.Net to write and read from the port. My device responds with specific sized set of bytes, but I am finding that…
Kevin Buchs
  • 2,520
  • 4
  • 36
  • 55
2
votes
1 answer

c# system.net.FileWebRequest Access denied error

I want to get a file size over network via System.Net.FileWebRequest. For example: \IP\c$\sampleFile.txt I supply the credentials for accessing file via passing it to FilewebRequest's credentials but the code below returns an access to path denied…
dankyy1
  • 1,094
  • 2
  • 16
  • 32
2
votes
1 answer

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 code for what's puzzling me: using System; using…
2
votes
1 answer

Changing IP address using .net core on Linux

Is there a way to use .net core code to change networking configuration (IP address, mask, default gateway, DNS, DHCP) On a Linux operating system? (I am using Ubuntu 18.4.2 LTS ) I can use for some extent the following…