Some help with a Service.. again

Pho3nix

The Legend
Joined
Jul 31, 2009
Messages
30,589
Hi,

Working with a rest service and have a problem.
I get this : Method not allowed.
When hitting the method below :

Code:
[OperationContract]
[WebInvoke(Method = "PUT", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, UriTemplate = "UpdateScoring?UID={uid}&IsWhat={isWhat}&Risk={Risk}")]
void UpdateScoring(string uid, bool isWhat, string Risk);

Code:
        public void UpdateScoring(string uid, bool isWhat, string risk)
        {
            IRiskOrchestrationRepository repository = new RiskOrchestrationRepository(conn1, conn2, conn3);

            repository.SaveScoring(uid, isWhat, risk);
        }

Thoughts?

Already added this to the web config :
Code:
 <handlers accessPolicy="Read, Execute, Script">

and these :
Code:
<add name="SimpleHandlerFactory-Integrated" path="*.ashx" verb="GET,HEAD,POST,DEBUG,PUT" type="System.Web.UI.SimpleHandlerFactory" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode" />
<add name="SimpleHandlerFactory-Integrated-pathed" path="PUTENABLED/*.ashx" verb="GET,HEAD,POST,DEBUG,PUT" type="System.Web.UI.SimpleHandlerFactory" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode" />

Can't debug this one method while the others work fine albeit they are all "GET"'s.

Help? :(
 
Last edited:

mister

Executive Member
Joined
Jul 21, 2008
Messages
9,157
[WebInvoke(Method = "PUT"

Change to get

EDIT: It's not working because you are supposed to be issuing a PUT, not a GET. What are you doing to get the error?
 
Top