views:

280

answers:

1

Hi,

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 Denied</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?

+2  A: 

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

alt text

Darin Dimitrov
Yup, I found it when I rechecked my configuration. Thanks.PS Any security reason Microsoft wouldn't have enabled PUT by default?
Philip
PUT requests are usually used to modify files on the server, so I suppose for security reasons they are disabled by default.
Darin Dimitrov