English 中文(简体)
ASP.NET B. 基于作用的接触
原标题:ASP.NET Role based access

我有以下地点结构:

enter image description here

我期望这样做的是,不让任何人在<代码>上挂牌照使用。 注册的User作用,但Reset.aspxValidation.aspx<>除外,如果允许任何人(未登记)进入,但现在情况并非如此。

1. 每个人: 用户/编码 难道没有能够查阅这两页,我做什么错了?

<>Update> 即便如此,这项工作也取得了成功:

<?xml version="1.0"?>

<configuration>
  <location path="Reset.aspx">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>

  <location path="Validation.aspx">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>
</configuration>

这没有任何意义,难道这不意味着系统违约吗?

最佳回答

你们不需要绘制道路图,只有档案名称:

<?xml version="1.0"?>

<configuration>
  <location path="Reset.aspx">
    <system.web>
      <authorization>
        <allow users="*" />
        <deny />
      </authorization>
    </system.web>
  </location>

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

  <system.web>
    <authorization>
      <allow roles="RegisteredUser" />
      <deny users="*" />
    </authorization>
  </system.web>
</configuration>
问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!