UmbracoAuthorize always returns Authorization has been denied on a production server
Some weird problem when using UmbracoApiController. [U-7.1.6 assembly: 1.0.5350.25714]
I have a controller that uses UmbracoApiController.
When I request a url 'umbraco/api/CReview/Delete/4', it says 'Authorization has been denied' on the production server, even i have logged in as admin.
Locally it works fine, no problem. It's only problem on the production server.
public class CReviewController : UmbracoApiController
{
[System.Web.Http.AcceptVerbs("GET", "POST")]
[System.Web.Http.HttpGet]
[Umbraco.Web.WebApi.UmbracoAuthorize]
public string Delete(string id)
{
// delete operation goes here
return "true";
}
}
UmbracoAuthorize always returns Authorization has been denied on a production server
Some weird problem when using UmbracoApiController. [U-7.1.6 assembly: 1.0.5350.25714]
I have a controller that uses UmbracoApiController. When I request a url 'umbraco/api/CReview/Delete/4', it says 'Authorization has been denied' on the production server, even i have logged in as admin.
Locally it works fine, no problem. It's only problem on the production server.
There is another API that you can use withouth the UmbracoAuthorize attribute.
Just remove the attribute and inherits your controller from UmbracoAuthorizedApiController
The only thing you need to take in account is that the url for your API changes when you this.
Your url will become /umbraco/backoffice/CReview/Delete/4
Dave
@Dave thanks for your response. I will try with UmbracoAuthorizedApiController
Just one more stuff, If I disable ssl certificate, It does work as expected.
But It does not work on https.
Does https makes difference on umbraco authentication?
@Dave Thanks,
This did not work '/umbraco/backoffice/CReview/Delete/4'
But This worked /umbraco/backoffice/
api
/CReview/Delete/4Hi Jivan,
Just typed it from memory..Probably why I forgot to include api.
Dave
is working on a reply...