Questions tagged [webexception]

81 questions
0
votes
1 answer

The remote server returned an error: NotFound. Only when i use wrong credentials...WP8

Strange thing happens in my code when i try to connect to a server... With authorized credentials the statuscode in the response's return is "OK" (im happy with that) But When i use unauthorized credentials to login the statuscode response should…
0
votes
1 answer

I get WebException timeout when I use webclient.DownloadFile after webclient.ResponseHeaders

I am trying to create my own download manger. When a link is added to the download manger I use a webclient to get it's information from the server. Like so WebClient webClient = new WebClient(); webClient.OpenRead(link); string filename =…
MarwanMR1
  • 11
  • 2
0
votes
2 answers

HttpWebRequest doesn't throw exception

I have a problem with httpwebrequest exception. I use the following code to make a request and catch the exception. try { Uri url= new Uri("https://www.example.com"); HttpWebRequest request2 =(HttpWebRequest)WebRequest.Create(url); …
Oktay
  • 127
  • 1
  • 2
  • 15
-1
votes
1 answer

WebClient.DownloadStringAsync webexception wp7

I'm trying to remove a node from an xml file, everything works, but sometimes it happens that the xml web page does not load. this is my code: private void HttpsCompleted(object sender, DownloadStringCompletedEventArgs e) { if (e.Error…
Riccardo Gai
  • 421
  • 1
  • 6
  • 19
-2
votes
1 answer

How to handle exception in C# when target machine refused connection

I have a function where I connect to an API. Sometimes the API is not available. I know why but I would like to prevent my program from crashing when this is the case. But whatever I try it always crashes with: Exception Unhandled…
-2
votes
1 answer

Error calling Webservice, when changing IP address in IIS from * to specific

I have a site with a couple of application setup, that was working correclty that is hosted on a client server, but the client wanted to change the IPaddress in the binding from *(All unassigned) to a specific IP address. Since then when the…
1 2 3 4 5
6