I've written code for file upload and download using the HttpWebRequest
and HttpWebResponse
classes in C# with the Apache HTTP server v2.2. In code, I am using 'request.method = "PUT"', so I want to configure my httpconfig file to support the PUT method. I write 开发者_Go百科the PUT method script as
<Location "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/output">
<Dav On
<LimitExcept GET HEAD OPTIONS PUT>
<Allow from all
</LimitExcept>
</Location>
That's not working. How do make it work?
Try configuring it like below. You will need a proper path to the program/handler that will process PUT requests.
<Location "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/output">
Dav On
<LimitExcept GET HEAD OPTIONS PUT>
<Allow from all>
</LimitExcept>
Script PUT {path to PUT handler}
</Location>
精彩评论