Reputation: 813
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.
Upvotes: 2
Views: 22996
Reputation: 51
sometimes you may have deployed it in the wrong location. You may need to deploy your code inside site/wwwroot
Upvotes: 0
Reputation: 24549
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.
Upvotes: 6