Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
When uploading a file to an ftp server using WebClient.UploadFile(ftpPath, filePath) there are 3 lines of the header added to the beginning of the uploaded file. I tested this using a server running vsftp from both a Mono console project (using Xamarin Studio on a Mac) and a .NET console project (using Visual Studio). When running the same code with .NET, there is no extra text at the start of the file.
## steps to reproduce:
1. Open the attached test project in Xamarin Studio (Mac)
2. set the four variables for the filepath, username, password, and ftphost. Obviously the ftp host must be a live ftp server with a user with the username and password you enter. There is a simple two line text file, testfile.txt. in the project folder.
3. Run the project.
4. Inspect the uploaded file.
Expected result: the uploaded file will be identical to the original file.
Actual result: the uploaded file has three lines appended to the beginning of the file that appear to be header information, e.g.:
Content-Disposition: form-data; name="file"; filename="testfile.txt"
Running the identical code in a Visual Studio C# Console project, but of course modifying the path to the text file for Windows environment, the uploaded file is identical to the original file.
Created attachment 9456 [details]
Fix and test cases are available here:
This can not be applied to master, which has the Microosft implementation.
But this can be applied to a branch if we need to.
I have checked this issue with Mono: 22.214.171.124 and observed that now the uploaded file is identical to the original file.
Mac OS X 10.10.0
Xamarin Studio: 5.7.2 (build 10)
Installation UUID: 6ea47b0d-1852-4aaf-808d-373ff0a5002b
Mono 3.12.0 ((detached/b8f5055)
GTK+ 2.24.23 (Raleigh theme)
Package version: 312000077
=== Build Information ===
Release ID: 507020010
Git revision: 52601676108dae9f012b5e8378a3d6e742143e16
Build date: 2015-02-19 18:25:24-05
Xamarin addins: b212fd66838b0d6e2435966e541e66ab9c988698
Observation: I have checked this issue with attached project and observed that when I upload a file to an ftp server using WebClient.UploadFile(ftpPath, filePath), not extra values are added to the file. The uploaded file is identical to the original file.
This issue has been fixed. Hence I am closing this issue.