403 Access Denied for DELETE.NET Web Api Rest Service Request on Azure
I am completely unsure of the reason for this. All types of requests work on localhost.
But when I post to Windows Azure Shared Site GET, POST and PUT requests work, and DELETE requests Fail.
Immediately after creating the data, I cannot delete it, it happens through my local ISP and works from my mobile phone on the Internet.
I tried
- ipconfig / flushdns
- Moving to Google and OpenDNS
- Adding default document to web.config for Mvc - Views / Home / Index.cshtml
- Adding - runAllManagedModulesForAllRequests = "true"
This is all I will return.
HTTP/1.1 403 Access Denied
Date: Mon, 08 Jun 2015 16:15:44 GMT
Connection: keep-alive
Cache-Control: no-store
Content-Type: text/html
Content-Language: en
Content-Length: 249
+3
source to share
1 answer
You probably just need to include the DELETE verb in your web.config file.
(source: http://microsoftazurewebsitescheatsheet.info/#enable-http-verbs )
<configuration>
<system.webServer>
<handlers>
<remove name="ExtensionlessUrl-Integrated-4.0" />
<add name="ExtensionlessUrl-Integrated-4.0"
path="*."
verb="GET,HEAD,POST,DEBUG,DELETE,PUT"
type="System.Web.Handlers.TransferRequestHandler"
preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
</system.webServer>
</configuration>
+3
source to share