Full text of the error: 403 - Forbidden: Access is denied by the credentials

In general, there is a WebForms project. In the Content folder are pages protected from unauthorized users. At the root is the Login.aspx page. All requests for pages in the Content folder, provided that the user is not authorized, are redirected to Login.aspx. With successful authorization, from the Login.aspx page are redirected to defaultUrl.

Response.Redirect(FormsAuthentication.DefaultUrl); 

Web.config:

  <location path="content"> <system.web> <authorization> <deny users="?"/> <allow users = "*"/> </authorization> </system.web> </location> <system.web> <authentication mode="Forms"> <forms loginUrl="Login.aspx" defaultUrl="~/Content/Default.aspx"/> </authentication> <compilation debug="true" targetFramework="4.5"> </system.web> 

On the local server, everything is fine, but on the remote server it gives an error 403 ..

And not for all requests, if you specifically specify in the address bar: http://website.com/application_path/Content/Default.aspx then the page will appear, and if: http://website.com/application_path/ then not ..

It seems that something is wrong with the start page, I have: /Content/Default.aspx

  • with any request? or to any particular folder? In any case, it is worth checking whether IIS has access to these folders, it is possible that there is n’t - Grundy
  • then you should check the permissions of this folder for the user under which IIS works - Grundy

0