Permission Error when deploying Api Apps

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

You want to deploy Azure Api App and get following error?

image

If you drill deeper into the error, you will get this:

The website declined to show this webpage

HTTP 403

Most likely causes:
  • This website requires you to log in.

What you can try:

More information

This error (HTTP 403 Forbidden) means that Internet Explorer was able to connect to the website, because it does not have permission to view the webpage. This is wired, because you are owner of the site, right?

The problem is not permission to you site. Open the Azure Portal and navigate  to settings of the API (WebApp).

image

Then change Access Level to the public one.

image

Most interesting with this error is probably, how can you get any valuable information when such error happen in different context. Here is how I did it. Before publish operation in VS I started fiddler and recorded all request. The last one which returned the real error was following one:

GET https://microsoft-apia****f.azurewebsites.net/

HTTP/1.1 403 Forbidden
Cache-Control: private
Content-Length: 228
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Set-Cookie: ARRAffinity=1Domain=****.azurewebsites.net
Date: Sat, 11 Apr 2015 15:20:38 GMT

{
  "status": 403,
  "source": https://***.azurewebsites.net/,
  "message": "Permissions for service \"LoadUnitService\" are set to internal but this request was external."
}

If you tale a look on yellow-marked part, you will see that it briefly describe the reason.


Posted Apr 16 2015, 07:00 AM by Damir Dobric
developers.de is a .Net Community Blog powered by daenet GmbH.