I have googled for the past 3 hours and found nothing on what to do with respect to the windows azure problem:
You do not have permission to view this
Simple configuration, in the azure portal go to your web app -> All settings -> application settings, under default documents add the specific name of your document which you want to view, wait for it to update, then refresh your azure link.
I had the same error message after a git push
from a local repository.
Solved it by opening the Azure dashboard:
Web app / App deployment / deployment source
and selecting local git repository as deployment source
I hit this error too. I am using MVC and the reason for the error was that on my layout page I had a call to an action that isn't accessible to anonymous users:
@Html.Action("GetMenu", "Users")
For information, I register a AuthorizeAttribute()
global filter in Application_Start and my Login
action is decorated with AllowAnonymous
:
[HttpPost]
[AllowAnonymous]
[ValidateAntiForgeryToken]
public ActionResult Login(LoginModel model, string returnUrl)
{
My website did work previously on IIS7, but Azure is less forgiving. I fixed the problem by adding a check like this:
@if (User.Identity.IsAuthenticated)
{
@Html.Action("GetMenu", "Users")
}
AvkashChauhan's answer did lead me in the right direction but I also had to add proper rewriting rules. Here is my complete web.config
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation batch="false" />
</system.web>
<system.webServer>
<handlers>
<add name="iisnode" path="server.js" verb="*" modules="iisnode" />
</handlers>
<rewrite>
<rules>
<rule name="myapp">
<match url="/*" />
<action type="Rewrite" url="server.js" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Not specific to node.js but updating in case it helps others facing this issue for a regular web application. This can also happen if the index.html file is not present or is not found because it is in a sub-directory
I just came across this issue and in my case it was the ipSecurity configuration that was causing the issue. Just hd to go and change the allowUnlisted to true.
<security>
<ipSecurity allowUnlisted="false">
</security>