Default PUT receiver with uploads
Posted on 2009-02-10
I am trying to "PUT" a file (upload) to a web directory, where my destination web is located on a Linux web server. This does work on IIS, but on Linux it won't. The upload is a "PUT", and it's an HTTP upload, not FTP. Upload returns error 405 (method not allowed), which obviously refers to the PUT method not being allowed. However, the dir is write enabled for everyone. So the question is what settings do I need on the Linux server, to allow the "PUT" method on my directory?
When "PUT"-ting files, destination makes use of a receiver app on server. In my case, there is no receiver. IIS has a default receiver that puts the file, although MIME encoded, which I don't mind. Linux should also have such a default receiver, sounds like a basic feature - but I have no idea how to set this up.
I use this C# code: wc.UploadFile(dest, "PUT", source); where wc is an instance of the WebClient class in .Net, dest is path on server and source denotes the local file to be uploaded. Again, this upload works on IIS where the dir is write enabled Such code can be called fron an asp.net page and it won't work with Linux servers as destination.