Jump to content

Recommended Posts

Posted

OK so this should be fun as I have no ASP knowledge, but am willing to start picking it up as I go.

 

For our remote webfolders webpage (RM Easylink), I want to be able to display a page based on a users AD membership. So staff will see the staff shared folder, students see the students, etc.

I've looked through a couple of help pages but cannot find anything definitive.

All I want is a main page, with a login link. When you enter your details, it checks against AD and if you are in the student group, you get student.asp page, if you are in staff, you get staff.asp....each with different webfolder mappings.

Is this possible?

Thanks

  • 2 weeks later...
Posted

In IIS turn on Windows Integrated Authentication (this will mean the user will noe even need ot log on using username/password unless they are accessing it from a non-domain machine - eg from outside network)

add this line to the system.web section of your web.config

 

 

put the following (rough - it may need refined) code in the Page_Load of your default.aspx:

 

If User.IsInRole("Staff") then

Response.Redirect("\Staff\StaffOnlySite.aspx")

else od User.IsInRole("Students") then

Response.Redirect("\Students\StudentsSite.aspx")

else

Response.Redirect("UnauthorisedUser.aspx")

end if

 

For additonal securoty create a web.config in you staff folder and add the following code to it which will ensure students still cant view enve by entering a direct url

 

 

 

 

above assumes all staff accounts are ina group called staff and all student accounts are in a student group

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...