English 中文(简体)
。 NET 认证授权作用
原标题:.NET authentication authorization roles login redirct returnURL confusion

在我的理解中,必须遗漏一些东西。 NET的认证/授权和日志再引导系统运行。 我有一页的“行政”。 例如,我有:

<configuration>
  <system.web>
    <authorization>      
      <allow roles="admin" />      
      <deny users="*" />
    </authorization>
  </system.web>
</configuration>

当用户来到这里时,如果他不是一家行政公司,他就会被转往网上规定的标识网页。

<authentication mode="Forms">
  <forms loginUrl="Login.aspx" name="someName" timeout="60" path="/">
  </forms>
</authentication>

返回地(例如回归城市=%2fAdmin%2fDefault.aspx)。 现在,如果用户日志再有与“行政”作用规格不相符的全权证书,他就会被转往行政/防弹页,然后回到日志上。

我猜测它的所有工作罚款,但如果用户不停,我似乎可以改用原木页,但如果他gged住但不符合作用要求,则将他转往另一个(家庭或违约)页。

我怎么办?

提前感谢,

判决

最佳回答

你们可以采取以下两种方式:

  1. Write a custom authentication provider derived from the forms provider.

  2. 撰写《HttpModule》时,我不敢确定哪些活动最容易陷入困境,因为在认证你本人之前,验证表格认证模块已经将你转至标识页。 因此,确定今后事件的直接反应可能是前进的道路。 (这可能会产生附属效应,即所有对经认证的用户日志的重新定位都将进入用户主页上的记录)

问题回答

暂无回答




相关问题
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!

热门标签