c# - Invalid PUT method from Webforms to Web API 2 (Azure) -
i have web api in azure server , i'm making calls asp.net webforms website.
i seem able perform no trouble. put, it's giving me error:
the page looking cannot displayed because invalid method (http verb) being used
i not able delete either. see other topics people disable webdav , stuff on iis servers , works. on azure?
below code put:
httpresponsemessage response = client.getasync("api/people/" + id).result; if (response.issuccessstatuscode) { var yourcustomobjects = response.content.readasasync<people>().result; uri peopleurl = response.headers.location; yourcustomobjects.name= "bob"; response = await client.putasjsonasync(peopleurl, yourcustomobjects); tbdebug.text += await response.content.readasstringasync(); }
alright grew tired of trying fix issue enabling put.
so did, wrote makes needed change in database.
cheers
Comments
Post a Comment