Questions tagged [system.net.webexception]

system.net.webexception is a .NET exception is thrown when an error occurs while accessing the network through a pluggable protocol.

system.net.webexception is a .NET exception is thrown when an error occurs while accessing the network through a pluggable protocol.

174 questions
1
vote
2 answers

How do I fix System.Net.WebException: 'The filename, directory name, or volume label syntax is incorrect

I am trying to create a bootstrapper for a program and the error "System.Net.WebException: 'The filename, directory name, or volume label syntax is incorrect " Keeps popping up. I have been stuck on this problem and have been guessing how to solve…
Dread415
  • 31
  • 8
1
vote
0 answers

VSTO-specific web request not working (System.Net.WebException)

I wrote a 2013/2016 VSTO app for Microsoft Word using C#. My app creates a new toolbar with buttons. One such button runs my app, which launches a basic Windows Form. Before the user can work with my app, they need to enter information like their…
Bill
  • 582
  • 1
  • 7
  • 21
1
vote
2 answers

Why does HttpWebRequest fail the first time and then works OK?

I am truing to integrate fusemail in asp.net 2.0. I am using HttpWebRequest for requesting the API pages. It has recently come to my notice that HttpWebRequest fails the first time and then continues and subsequent requests succeed. say ( i know if…
Pankaj Kumar
  • 1,748
  • 6
  • 28
  • 41
1
vote
1 answer

Xamarin Forms System.Net.WebException

I am creating an android app using Xamarin.Forms. On toggling internet connectivity off and on frequently, i am getting System.Net.WebException ConnectFailure exception. I have tried to handle it in my PCL code but it is not getting caught in…
Tarun
  • 23
  • 5
1
vote
1 answer

Xamarin.Android HttpClient PostAsync gets cancelled when in Release

My application utilizes a few REST API endopints using HttpClient. My GetAsyncs are working perfectly fine both when used in Debug and Release mode. The problem occurs when I try to PostAsync a large picture to the API in Release mode. The…
1
vote
0 answers

System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions [2607:f8b0:400e:c04::6d]:587

I'm trying to send mail using smtp which was working fine on previous production server but after when i moved it to another production server mail is not delivering and displaying the inner exception stating System.Net.WebException: Unable to…
1
vote
0 answers

ReportExecutionService not honoring timeout

I am using .NET ReportExecutionService to render SSRS reports. We are rendering many reports in rapid fire and we are randomly getting reports that timeout. Somewhere around 1 out of 1400 reports will hang. When I check the hanging report in…
1
vote
1 answer

HttpWebRequest: cleaner access to numeric HTTP status codes?

When I try to get a nonexistent page, or use an invalid HTTP method, HttpWebRequest.GetResponse() throws a System.Net.WebException, with a Status property of ProtocolError. In its Message property I can see the HTTP status code in parentheses. Fine.…
JCCyC
  • 16,140
  • 11
  • 48
  • 75
1
vote
0 answers

Get detailed error information on creating httpwebrequest from c# to website

I am checking a website is active or not using below code. If website is inactive like screen shot. I want to log the detailed error information from the response. how can i do it..? please suggest.. private static bool CheckWebSiteActive() …
1
vote
1 answer

Internal server error (500) httpwebrequest

System.Net.WebException: The remote server returned an error: (500) Internal Server Error. at System.Net.HttpWebRequest.GetResponse() at refill.btnRequestRefill_Click(Object sender, EventArgs e) I get this error when trying to submit a…
n_starnes
  • 376
  • 1
  • 6
  • 20
1
vote
0 answers

HttpWebRequest random 'request timed out' exception

I am currently developing in Unity (in particular using C#) and I'm stuck with HttpWebRequest - HttpWebResponse random timeouts. I have some methods that send a POST request to a server I host on my local machine (XAMPP) to use various php scripts…
1
vote
1 answer

accessing tfs from c# authentication exception

I am trying to access TFS server via c# code and I keep running in this issue. The issue occurs only when I try to debug the code but if I just try to build and run it succeeds. var credentials = new NetworkCredential("username","password"); var…
Min0
  • 150
  • 1
  • 1
  • 12
1
vote
0 answers

c# throw webexception and socketexception after running for a while

I wrote a C# program which post HTTP heartbeat request every 5 second,it runs well at the beginning,but after about 20-40 mins, it keeps throwing webException at the method HttpWebRequest.BeginGetRequestStream( ) ( or at…
McHo
  • 23
  • 5
1
vote
0 answers

The underlying connection was closed within C# dll from VB6

I have done a C# dll and I'm using it from an old VB6 project. I can correctly use it, but I have a problem. In this dll, I make an http request to a server of mine, where I have set a wcf service. This code works well when I try to execute it from…
Piero Alberto
  • 3,823
  • 6
  • 56
  • 108
1
vote
2 answers

Asp.net HttpWebResponse - how can I not depend on WebException for flow control?

I need to check whether the request will return a 500 Server Internal Error or not (so getting the error is expected). I'm doing this: HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest; request.Method = "GET"; HttpWebResponse…