Last post Apr 13, 2012 01:39 PM by MartinJ.
Apr 13, 2012 01:28 PM|MartinJ.|LINK
I'm having trouble calling PUT and DELETE methods using Silverlight 5. I tried calling the resource with DELETE using another Client, and it worked. This also worked before with the WCF Web API, but it does not anymore with ASP.NET WebAPI.
I'm using the Client Stack which does support DELETE and PUT requests (http://msdn.microsoft.com/en-us/library/dd920295%28v=vs.95%29.aspx), and also I have a clientaccesspolicy.xml in my root folder.
The content of the clientaccesspoliy.xml is as followed:
<?xml version="1.0" encoding="utf-8"?>
<resource path="/" include-subpaths="true"/>
I also added this to my RegisterRoutes method, to make the file accessible:
Every time I try to make a call I immediately get a SecurityException. The call does not even reach ASP.NET (Application_BeginRequest is not triggered).
Any one knows how to solve this issue?
Apr 13, 2012 01:33 PM|Bimalvv|LINK
Modify this line like this
<allow-from http-request-headers="*" http-methods="*">
Apr 13, 2012 01:39 PM|MartinJ.|LINK
Good point, but no luck. This changes nothing. :(
edit: Whoops, I accidently modified the wrong file. It works, thank you very much. :) Do you perhaps have any explanation why this worked before?