Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Abdul Rahim 21 posts 83 karma points
    Jun 24, 2015 @ 08:27
    Abdul Rahim
    0

    Authorization has been denied for this request Error

    Hi,

    When I set site's Culture and Host names, I got the following Error Message in Umbraco 7.2.6.

    {"Message":"Authorization has been denied for this request."}

    enter image description here

    enter image description here

    Please give a solution for this issue.

    Thanks

    Rahim

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jun 24, 2015 @ 12:28
    Jan Skovgaard
    0

    Hi Abdul

    Wow that's a weird one...don't think I have seen that one before.

    Is there any specific reason as to why you need to setup the hostname when running it using IIS express?

    I'm not sure how it actually works if one tries to do that - I'm feeling confident that if you setup a real IIS site and then setup the hostnames then it would work.

    If my memory is correct you need to tweak some configuration files somewhere to make the above work if you want to run multiple sites on IIS express...

    Hope this helps :)

    /Jan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jun 24, 2015 @ 12:29
    Jan Skovgaard
    0

    Seems you need to setup something in the applicationhost.config file according to this article http://dailydotnettips.com/2014/01/29/5-internal-things-that-you-should-know-about-iis-express/ - But I think that it's probably better to simply just use a real IIS site instead...but that's just my 2 cents :)

    /Jan

  • Abdul Rahim 21 posts 83 karma points
    Jul 22, 2015 @ 05:10
    Abdul Rahim
    100

    Hi Guys

    api call of my Umbraco with the clean one and noticed that mine was pointing at /api/v1/DomainsApi/SaveLanguageAndDomains instead of /umbraco/BackOffice/Api/DomainsApi/SaveLanguageAndDomains.

    It turned out that this was caused by my own call to MapHttpRoute where I register my own api. Once I removed it the error was gone.

    Here is the file name and changed code

    umbraco_client\Dialogs\AssignDomain2.js

    Replace the commented code with the other one

     //$.post(self._opts.restServiceLocation + 'SaveLanguageAndDomains', ko.toJSON(data), function (json) {
     $.post('/umbraco/BackOffice/Api/DomainsApi/SaveLanguageAndDomains', ko.toJSON(data), function (json) {
    

    Still it is working well.

    Thanks

Please Sign in or register to post replies

Write your reply to:

Draft