开发者

Configure Apache HTTP 2.2 for PUT method

开发者 https://www.devze.com 2023-03-31 15:58 出处:网络
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

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>
0

精彩评论

暂无评论...
验证码 换一张
取 消