tagged [system.net]

Send SMTP email using System.Net.Mail via Exchange Online (Office 365)

Send SMTP email using System.Net.Mail via Exchange Online (Office 365) We are testing the new Office 365 beta, and i have a mail account on the Exchange Online service. Now I'm trying to connect a LOB...

The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF, In WinForms?

The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF, In WinForms? I am trying to use a WebClient / HttpWebRequest to download some data from a server. I ...

System.Net.WebException: The remote name could not be resolved:

System.Net.WebException: The remote name could not be resolved: I am testing an endpoint that I am experiencing some issues with. I am simply using `HttpClient` in a loop that performs a request each ...

1 Nov at 22:24

Which specific status codes cause a WebException to be thrown by HttpWebRequest.GetResponse()?

Which specific status codes cause a WebException to be thrown by HttpWebRequest.GetResponse()? I've hunted around for some definitive documentation on this but haven't had much luck finding any. For w...

Can I mark an Email as "High Importance" for Outlook using System.Net.Mail?

Can I mark an Email as "High Importance" for Outlook using System.Net.Mail? Part of the application I'm working on for my client involves sending emails for events. Sometimes these are highly importan...

8 Sep at 16:17

Difference between operation has time out and (504) Gateway Timeout

Difference between operation has time out and (504) Gateway Timeout I am using `HttpWebRequest` in my application which is checking some URI's in multiple threads. I am getting multiple types of time ...

6 Sep at 20:33

Ping always succeeds, cant easily check uptime using ping on a url

Ping always succeeds, cant easily check uptime using ping on a url Im getting frustrated because of OpenDNS and other services (ie: roadrunner) that now always returns a ping even if you type any inva...

6 Jul at 09:28

Error 502 (Bad Gateway) when sending a request with HttpWebRequest over SSL

Error 502 (Bad Gateway) when sending a request with HttpWebRequest over SSL I have the following snippet in classic ASP, to send a command and retrieve the response over SSL: ``` Dim xmlHTTP Set xmlHT...

How do I clear System.Net client DNS cache?

How do I clear System.Net client DNS cache? I'm using the .NET WebRequest while changing my HOSTS file. I'm observing that System.Net doesn't honor those changes - how can I make it do so? I have a nu...

1 Sep at 23:5

How to embed multiple images in email body using .NET

How to embed multiple images in email body using .NET I'm writing a program that sends emails to users with multiple images (charts) embedded in the Email message body (HTML). When I tried the sample ...

13 Aug at 07:12

Failure on HttpWebrequest with inner exception Authentication failed because the remote party has closed the transport stream

Failure on HttpWebrequest with inner exception Authentication failed because the remote party has closed the transport stream Using C#, .Net 4.5, I'm trying to send out a web request through HttpWebRe...

The parameter 'addresses' cannot be an empty string

The parameter 'addresses' cannot be an empty string I am trying to send an email in ASP.NET using the [System.Net.Mail.SmtpClient](https://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient(v...

22 Jun at 16:47

"Unable to read data from the transport connection: net_io_connectionclosed." - Windows Vista Business and SMTP

"Unable to read data from the transport connection: net_io_connectionclosed." - Windows Vista Business and SMTP Unable to test sending email from .NET code in Windows Vista Business. I am writing code...

How do I add an attachment to an email using System.Net.Mail?

How do I add an attachment to an email using System.Net.Mail? I have an excel document represented as a byte[] and I'm wanting to send it as an attachment in an email. I'm having a bit of trouble cons...

WebClient UploadFileAsync strange behaviour in progress reporting

WebClient UploadFileAsync strange behaviour in progress reporting i need some help with strange WebClient.UploadFileAsync()'s behaviour. I'm uploading a file to a remote HTTP Server (nginx) usind POST...

20 Sep at 10:26