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

verify cname record

If I have the following CNAME records set up: www.custom1.com CNAME www.myapp.com www.myapp.com CNAME myapp.cloudapp.net Will Dns.GetHostEntry("www.custom1.com") always return a HostName of myapp.cloudapp.net. Essentially I'm allowing…
Ben Foster
  • 34,340
  • 40
  • 176
  • 285
4
votes
1 answer

Using an https:// asmx-based service with Monotouch

I'm trying to add a web reference to an asmx web service with ssl. I'm getting this error: Error getting response stream:(Write: The authentication or decryption has failed.)SendFailure I have self a signed certificate. Is there a solution to this…
Mr Q
  • 127
  • 8
4
votes
3 answers

How to detect public IP address (of router/gateway) change in .Net?

I am aware of the NetworkChange.NetworkAddressChanged event, but that is only for the local network interfaces. What is the best way to detect the public IP address of the gateway has changed? Presumably one has to do it by polling an external…
Lara
  • 163
  • 2
  • 9
4
votes
1 answer

is system.net connectionManagement maxConnection per domain or shared when using wildcard address?

The documentation for the maxconnection configuration value in the system.net connectionManagement section of a config file is confusing me. When you use a wildcard in the address - is that limit per host or is that limit shared by all hosts (that…
Andrew M
  • 9,149
  • 6
  • 44
  • 63
4
votes
3 answers

Unable to fix error "Could not load System.Net.Http, Version=4.2.0.0"

On my production server I get the error: Could not load file or assembly 'System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. On my local…
Adam
  • 6,041
  • 36
  • 120
  • 208
4
votes
1 answer

Why the downloaded image from localhost using HttpWebRequest corrupted?

The original image(.jpg) file size is 49kb but when after I downloaded it the file size is 87kb and is corrupted. But for text files, it works. What do I need to do for downloading images using HttpWebRequest or other System.Net class? I'm using…
Ronald Abellano
  • 774
  • 10
  • 34
4
votes
1 answer

How to get the IP address in C#?

Assume that a computer is connected to many networks (actually more than one). I can get a list of IP addresses which includes all IP addresses the computer have in networks, but how can I know that an IP address belongs to which network?
user415789
4
votes
2 answers

Limit Dns.GetHostAddresses by time

i'm writing a script that resolve ip address for domain using C# the problem is that i have a lot of domains that does not resolve to an IP, so the code (Dns.GetHostAddresses) is running for a long time trying to resolve an IP for a domain that…
Eitanmg
  • 566
  • 1
  • 8
  • 20
4
votes
1 answer

HttpClient does not send same request in W10 UAP

I am currently facing what I think is a bug the System.Net.Http library and its HttpClient class. Please note that I am using the HttpClient from a Portable Class Library. If I user HttpClient.SendAsync the following query :…
4
votes
4 answers

How to check if Web server is up? (C#)

I am building a monitoring application to continuously monitor all aspects of my system. I was hoping to use the Ping() function to determine if the server is up but the MSDN documentation itself says that it is not the best way: A successful Ping…
Hari Menon
  • 33,649
  • 14
  • 85
  • 108
4
votes
1 answer

What are the underlying causes of a WebException with message "The request was aborted: The request was canceled."

I am making Http requests using an HttpClient. I occasionally see the following error: Exception Type: System.Net.WebException Error message: The request was aborted: The request was canceled. at…
ChaseMedallion
  • 20,860
  • 17
  • 88
  • 152
4
votes
7 answers

C# Performance For Proxy Server (vs C++)

I want to create a simple http proxy server that does some very basic processing on the http headers (i.e. if header x == y, do z). The server may need to support hundreds of users. I can write the server in C# (pretty easy) or c++ (much harder). …
NotDan
  • 31,709
  • 36
  • 116
  • 156
4
votes
3 answers

Sending email through SMTP fails : MailBox name not allowed

I am trying to send an email through an SMTP server but it fails giving me the following error: MailBox name not allowed. The server response was Senders must have valid reverse DNS Unfortunately I could not find meaningfull information to…
meda
  • 45,103
  • 14
  • 92
  • 122
4
votes
1 answer

Get IE's default proxy with DefaultWebProxy

I've read through pretty much all the documentation I can find but I'm yet to find a simple working example of how to get IE's default proxy settings using DefaultWebProxy(). This code seems to compile and work but how do I then go ahead and get the…
Paul Matthews
  • 2,164
  • 5
  • 20
  • 29
4
votes
3 answers

OPTS command on FtpWebRequest/FtpWebResponse

I'm using the FtpWebRequest and FtpWebResponse objects in the System.Net namespace to issue a LIST command. The problem I'm having is that the FTP server I'm connecting to does not have the OPTS command implemented. Is there a way of preventing…
GP.
  • 1,293
  • 5
  • 14
  • 20