当我导航到部署的 azure 网站时,出现错误,
You do not have permission to view this directory or page.
在我的 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>
完整的源代码是在我的 github 中 https://github.com/rberger247/EduSmart3。我跟着微软文档 https://learn.microsoft.com/en-us/azure/app-service/app-service-deploy-local-git将我的应用程序部署到azure。当我在本地运行我的应用程序时,没有任何错误。
您无权查看此目录或页面。
根本原因是您的 Azure 网站中没有默认页面。
您可以直接查看以下网址的页面,它应该可以工作。
https://{siteanme}.azurewebsites.net/views/login.html
或者你可以add the 默认文档 https://learn.microsoft.com/en-us/azure/app-service/web-sites-configure#default-documents在项目根文件夹中,并将其设置为 Azure 门户上的 appsetting 中的默认页面,save那个设定。
默认文档是在网站的根 URL 处显示的网页。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)