如何禁用表单身份验证 [英] How to disable forms authentication

查看:98
本文介绍了如何禁用表单身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站上有一个文件夹,该文件夹已通过基于表单的身份验证进行保护.现在,我必须在该文件夹中开发两个新页面,并且我想在测试和调试新表单时关闭安全性.我已将网站的web.config文件中的身份验证模式更改为mode ="None",并且已从安全文件夹中删除了web.config文件.我已经删除了浏览器中的所有cookie,但是当我从此文件夹中加载页面时,仍然会重新路由到登录页面.

I have a folder in my web site for which I secured with forms-based authentication. I now have to develop two new pages in that folder and I want to turn security off while I test and debug the new forms. I have changed the authentication mode in the web site's web.config file to mode="None" and I have removed the web.config file from the secured folder. I have deleted all the cookies in my browser, but when I go to load a page from this folder, I still am re-routed to the login page.

如何临时禁用网站中的表单身份验证?

How do I temporarily disable forms authentication in a web site?

2009年9月25日-我在根web.config文件中设置了表单authentication ="None".我从实现了表单身份验证的两个子文件夹中删除了web.config文件.我清除了缓存并删除了cookie.仍然要求我登录以查看文件夹中的页面.我导航到以前从未到过的机器上的页面,并被要求在那儿登录.它被缓存在服务器上网站上不会放开的地方.

9/25/2009 - I have set forms authentication = "None" in the root web.config file. I have removed the web.config files from the two sub-folders where forms authentication had been implemented. I cleared the cache and deleted the cookies. Still I am asked to login to view a page in the folder. I navigated to the page on a machine that had never been there before and was asked to login there. This is being cached somewhere in the web site on the server that won't let go.

推荐答案

尝试将以下信息添加到您的web.config中.这将从所需的授权中删除路径中的项目.

Try adding the information below to your web.config. This will remove the items in the path from the authorization required.

<location path="XXXXXXXXX">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>

这篇关于如何禁用表单身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆