开发者

C# HttpHandler to accept PUT requests to upload content

开发者 https://www.devze.com 2022-12-16 22:46 出处:网络
I\'ve written an HTTPHandler (in C#) to accept GET and PUT requests, to basically allow resource to be retrieved and updated by a remote client.

I've written an HTTPHandler (in C#) to accept GET and PUT requests, to basically allow resource to be retrieved and updated by a remote client.

The handler works fine locally on my dev machine however I run into issues running it on the server.

The web server server is IIS6 (running on a W2K3 Server box).

I've configured NTFS to permit the ASPNET user to write to specific areas under the website so ASP.NET shouldn't be hitting file security issues. I've checked my Web.config that I've added both verbs "GET,PUT".

However the response from a PUT request is always 403 Forbbiden.

HTTP/1.1 403 Forbidden
Via: 1.1 WMEPROXY
Connection: Keep-Alive
Proxy-Connection: Keep-Alive
Content-Length: 213
Date: Thu, 21 Jan 2010 14:47:30 GMT
Content-Type: text/html
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET

<html><head><title>Error</title></head><body><head><title>Execute Access Denie开发者_如何学Cd</title></head>
<body><h1>Execute Access Denied</h1>This Virtual Directory does not allow objects to be executed.</body></body></html>

Any ideas what I've missed?


You need to add the PUT verb to the ashx extension in IIS:

C# HttpHandler to accept PUT requests to upload content


(source: 15seconds.com)

0

精彩评论

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