Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi

 

I have 2 login pages...one for students and one for admin...and 2 web configs, how do I code the web config files to ensure that students only access their pages and admin have access to all.

 

The layout of pages are;

root

-login

-web config

-adminlogin

-----/Folder Student - pages

-----/Folder admin - pages

 

I have vb forms authentication implemented which works fine.

 

Thanks in advance

  • *Gurus*
Posted

An application's configuration is inherited from its parent with redefinitions in the application's configuration file (web.config) overriding those inherited from the parent.

 

In your case you should have one login page, with one web.config file and location elements specifying who can access what.

 

<configuration>
  <location path="Logon.aspx">
     <system.web>
        <authorization>
           <allow users="?"/>
        </authorization>
     </system.web>
  </location>
</configuration>

Posted

Hi

 

Thanks for the reply...can you have select statements in the web config file e.g

 

<authorization>

<allow users="select * from tblAdmin"/>

</authorization>

 

As the problem I have is...I need to vertify the users against tblStudent and admin again tblAdmin. I have tried to do the select statement in the login page but it keeps returning errors.

 

Any help would be greatly appreciated

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...