Questions tagged [webexception]
81 questions
0
votes
1 answer
Does HttpWebRequest.GetResponse() always throw a WebException if anything other than 200 is returned by the server?
Does HttpWebRequest.GetResponse() always throw a WebException if anything other than 200 is returned by the server?
I saw this question but the answers were not conclusive.

dFlat
- 819
- 7
- 19
0
votes
1 answer
FTP WebException-URI for this command invalid
I have a very simple piece of code.
Everything is correctly written, no typos, and i chattet with a coworker but both of us have simply no idead where the error lies in here.
It smoothly goes through undtil the GetRequestStream() where the…

MansNotHot
- 263
- 1
- 3
- 19
0
votes
1 answer
Unit test for connection / C#
Writing test for my application. Would like to test connection with exeption handling, for now I have created method which works and looks like :
[Test]
public void TestCreateConnection()
{
Connection…

yerpy
- 1,366
- 3
- 17
- 44
0
votes
1 answer
Upload files using FTP in PowerShell Scripts Fail
I am using PowerShell Scripts to upload the files by FTP. The scripts I use is following:
$File = "C:\test\test01.txt"
$ftp = "ftp://MyUsername:MyPassword@MyHostName/"
"ftp url: $ftp"
$webclient = New-Object System.Net.WebClient
$uri = New-Object…

Terry Zhang
- 4,541
- 8
- 23
- 29
0
votes
0 answers
Error download Zip File with size of 160MB via FTP in C#
I'm downloading a .zip for the library FTPLibrary using a my own synchronizer
When performing debugging , I find the error in this code
Data:
Visual Studio 2012.
Windows Form Aplicattion - C#
try
{
//Give Message of Command
…
0
votes
0 answers
Spring is not able to detect WebException in java file
I'm trying to get data from a server given a id every thing is working well, so i want to handle the exceptions in my code like invalid id such that for that id there is no data at server the server throws me some error so i want to handle that…

Labeo
- 5,831
- 13
- 47
- 77
0
votes
1 answer
Link checker ; how to avoid false positives
I'm working a on a link checker/broken link finder and I am getting many false positives, after double checking I noticed that many error codes were returning webexceptions but they were actually downloadable, but in some other cases the statuscode…

Pierluc SS
- 3,138
- 7
- 31
- 44
0
votes
1 answer
MS CRM 4.0- WebException: The request failed with HTTP status 401: Unauthorized
I am pretty to MS Dynamics CRM.
Our Company has to migrate one of our clients MS CRM 4.0 to CRM 2013.
I have being allotted task of creating MS CRM 4.0 setup from the db backup and custom application publish (CRMWeb folder).
Scenario:
I had to start…

shoab
- 545
- 3
- 7
- 19
0
votes
1 answer
Why does a bad url result in UnknownError, instead of a 400 or 404 code? WebException
Why does this not create WebExceptionStatus.ProtocolError? Instead I get WebExceptionStatus.UnknownError.
string url = "http://www.ogggle.com/"; // a bad url
var request = (HttpWebRequest) WebRequest.Create(url);
...options setup ellided
using…

sapbucket
- 6,795
- 15
- 57
- 94
0
votes
1 answer
WebException details changed on VS.Net
A Rest API call throws an exception on post. And that is
The remote server returned an error: (404) Not Found.
The following code calling the api
try
{
RestClient client = new RestClient(...);
string apiResponse =…

MJK
- 3,434
- 3
- 32
- 55
0
votes
1 answer
Can't catch Exception thrown from Task
I've been scratching my head on this for a while. I have no clue where this exception is being thrown. Where the heck am I supposed to catch this exception? It's a System.Net.WebException. I guess I'm just not getting Task and async/await. I…

Jared Price
- 5,217
- 7
- 44
- 74
0
votes
0 answers
Application Hangs on FTPWEBRequest Upload if Net connection lost
Hey I've been looking for a solution to throw a web exception if net connection is lost, I put in ReadWriteTimeout to be 8 seconds, but still doesn't throw an exception when I pull the plug. I changed Transfer timeout on filezilla server to 0.
Is…

AP_DOTNET54
- 13
- 5
0
votes
1 answer
WebException when consuming WCF Service on Windows CE device
I have a Windows CE project in Visual Studio 2008. There are multiple Web References to services hosted in IIS 6.0 on a Windows Server 2003. When I debug the app or run after it is deployed I am unable to consume the web services due to the…

field_b
- 688
- 5
- 21
0
votes
1 answer
System.Net.WebException command unrecognized
I am trying to upload picture to ftp. I can connect using filezilla or explorer. But when I use vb.net code I get error: System.Net.WebException: The remote server returned an error: (500) Syntax error, command unrecognized. Please help. I am going…

user1164545
- 129
- 3
- 5
- 10
0
votes
1 answer
WebException thrown when locking screen of the Emulator (WindowsPhone8)
I have a webrequest to get a xml.That works great but when i press F12(lock screen) while the the server is requested by my app...I got a WebException.
I use a taskCompeltionSource object...Here is my code
public async Task…

Paul Martinez
- 562
- 1
- 9
- 19