ASP.NET Hybrid Application - Multiple LoginUrl for different type of login

AukI

Member
Joined
May 5, 2011
Messages
6
Programming Experience
3-5
ASP.NET Hybrid Application - Multiple LoginUrl for different type of login:
web config.png

Is it possible to create multiple login system , like I have a folder called "Admin" and I had implemented below code in main root web.config file.

C#:
    <authentication mode="Forms">
      <forms loginUrl="~/Account/LogOn" timeout="2880" />
    </authentication>
and in that admin folder I had :
C#:
<?xml version="1.0"?>
<configuration>
  <system.web>
    <authorization>
        <deny users="?"/>
        <allow roles="Editor"/>
        <allow roles="Admin"/>
    </authorization>
  </system.web>
</configuration>
Now If I tried to open the file inside "admin/administrator/index.aspx" then it will redirected to the MVC common logon page(~/Account/LogOn) but I want a different page for this case.. Like if I tried to view the "admin/administrator/index.aspx" page I want it to be redirected to "Admin/default.aspx" file ...

I don't know how to create those roles like "admin" or "editor" and I can't find any good membership roles adding example over internet, can you tell me about membership roles process... How can I create one , or how can I create a dynamic system where site admin can define user roles...
 
Top Bottom