Azure错误.您无权查看此目录或页面 [英] Azure Error. You do not have permission to view this directory or page

查看:185
本文介绍了Azure错误.您无权查看此目录或页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

导航到已部署的azure网站时,出现错误

 您无权查看此目录或页面. 

在我的web.config中

 < system.web>< compilation debug ="true" targetFramework ="4.7"/>< httpRuntime targetFramework ="4.7"/></system.web>< system.webServer><处理程序><删除名称="ExtensionlessUrlHandler-Integrated-4.0"/><删除名称="OPTIONSVerbHandler"/><删除名称="TRACEVerbHandler"/>< add name ="ExtensionlessUrlHandler-Integrated-4.0" path ="*".动词="*" type ="System.Web.Handlers.TransferRequestHandler"preCondition ="integratedMode,runtimeVersionv4.0"/></handlers></system.webServer> 

完整的源代码是我的github中的

When I navigate to my deployed azure website, I get an error,

You do not have permission to view this directory or page.

In my web.config

 <system.web>
    <compilation debug="true" targetFramework="4.7"/>
    <httpRuntime targetFramework="4.7"/>
  </system.web>
  <system.webServer>
    <handlers>
      <remove name="ExtensionlessUrlHandler-Integrated-4.0"/>
      <remove name="OPTIONSVerbHandler"/>
      <remove name="TRACEVerbHandler"/>
      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler"
        preCondition="integratedMode,runtimeVersionv4.0"/>
    </handlers>
  </system.webServer> 

Full source code is in my github. I followed microsoft documentation to deploy my app to azure. When I run my app locally , I have no errors.

解决方案

You do not have permission to view this directory or page.

The root reason is that there is no default page in your Azure website.

You could directly view the page with following url, it should work.

https://{siteanme}.azurewebsites.net/views/login.html

Or you could add the default document in the project root folder and set it as default page in appsetting on the Azure portal and save the setting.

The default document is the web page that is displayed at the root URL for a website.

这篇关于Azure错误.您无权查看此目录或页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆