开发者

ASP.FormsAuthentication - Having two login pages [closed]

Closed. This question needs debugging details. It is not currently accepting answers.

Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.

Closed 7 years ago.

Improve this question

I have two different login pages for two different sub-sections of my site. I would like to declare two sets of defaultUrls and loginUrls for each login page/section. Is this possible? Does anybody have a code sample to do this?

I am securi开发者_Go百科ng both sections with similar code in the web.config files in each sections folder. Theoretically I would like to add to this config file where to go to login to this section.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.web>
    <authorization>
      <allow roles="Administrator"/>
      <deny users="*" />
    </authorization>
  </system.web>
</configuration>


I'm not sure if this is what you are looking for, but check out this post.


I don't think this is possible with out of the box forms authentication unless you create two separate IIS applications for the two sub-sections of your site.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜