I have my website. First time I can succesfully login.
Default address:
www.abc.com
I typed this on browser and I redirected to my login page:
www.abc.com/pages/landingpage.aspx
I entered my login credential and log into the site.
After some time I opened new tab and enter my website address
www.abc.com
Now it gives me error:
403 - Forbidden: Access is denied.
You do not have permission to view this directory or page using
the credentials that you supplied.
The whole story is this: if I am not logged on my site, then I can open my site number of tabs and browsers. But as soon as I logged in my site, I am getting the error above.
<authentication mode="Forms">
<forms name="MMFormAUTH" loginUrl="Pages/LandingPage.aspx" defaultUrl="Pages/LandingPage.aspx" timeout="60" protection="All" slidingExpiration="true" enableCrossAppRedirects="false" requireSSL="false" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
<sessionState cookieless="false" cookieName="abc" mode="InProc" timeout="60">
</sessionState>
<httpRuntime maxRequestLength="1000240" executionTimeout="120" />
This question is related to
asp.net
c#-4.0
web-config
In my case, the issue was new sites had an implicit deny of all IP addresses unless an explicit allow was created. To fix: Under the site in Features View: Under the IIS Section > IP Address and Domain Restrictions > Edit Feature Settings > Set 'Access for unspecified clients:' to 'Allow'
You can get the same error in Asp.net MVC5 if you have a class name and a folder with a matching name Example : If you have class lands where when you want to see view/lands/index.cshtml file, if you also have a folder with name 'lands' you get the error as it first try the lands folder
<configuration>
<location path="Path/To/Public/Folder">
<system.web>
<authorization>
<allow users="?"/>
</authorization>
</system.web>
</location>
</configuration>
I had the same problem. It turned out that I didn't specify a default page and I didn't have any page that is named after the default page convention (default.html, defult.aspx etc). As a result, ASP.NET doesn't allow the user to browse the directory (not a problem in Visual Studio built-in web server that allows you to view the directory) and shows the error message. To fix it, I added one default page in Web.Config and it worked.
<system.webServer>
<defaultDocument>
<files>
<add value="myDefault.aspx"/>
</files>
</defaultDocument>
</system.webServer>
Resolution for 404 Forbidden in recent .Net 4.7 MVC/webform pplication hosting in Azure VM We need to install the .Net 4.7 and extensibilty and development in server role other than the .Net 4.7/version feature as below: This might have been alreday activated .Net Activated feature
We need to also add the below under IIS webserver role-> Application Development -> select the .Net version as below Image to Activate the requited Role under IIS webserver Role Server Role Activation under application Development
If your using MVC in your project you must use:
routes.IgnoreRoute("");
More here.
Source: Stackoverflow.com