且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

403 - 禁止:访问被拒绝.您无权使用您提供的凭据查看此目录或页面

更新时间:2022-11-26 09:25:34

试试这个

 

现在您正在使用 <deny users="?"/> 这意味着您不允许经过身份验证的用户使用您的站点.

授权元素>

I have my website. First time I can successfully 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 a new tab and enter my website address

www.abc.com

Now it gives me an 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" />

Try this

 <allow  users="?" />

Now you are using <deny users="?" /> that means you are not allowing authenticated user to use your site.

authorization Element