0

Below is my code in master page which has three tabs: 1. Home 2. Employee Leave Detail Report 3. ProjectWise Reports.

Now I need to restrict the "ProjectWise.aspx" access to employees, I am not logged in directly on running the application, so currently I will see Home.aspx, Employee Leave Detail Report.aspx and ProjectWise.aspx.

I need to restrict the access ProjectWise.aspx to employees. How can I do this?

<div class="wrapper">
     <div class="menu">
       <ul>
           <li class="navigation_first_item"><a href="Home.aspx">Home</a></li>
           <li><a href="Employee Leave Detail Report.aspx">Employee Leave Detail Report</a></li>
           <li><a href="ProjectWise.aspx">ProjectWise</a></li>
        </ul>
      </div>
      <div class="clear"></div>
      <div class="content">
      <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">

      </asp:ContentPlaceHolder>
</div>
<div class="clear"></div>
   <br />
   <div class="footer">
        <p class="l">Copyright &copy; 2014 - <a href="#"></a> &middot; All Rights Reserved&nbsp;|&nbsp;Privacy Policy</p>
    </div>
</div>
Draken
  • 3,134
  • 13
  • 34
  • 54
abc
  • 61
  • 1
  • 10
  • Is this `Employee Leave Detail Report.aspx` an actual URL. http://stackoverflow.com/questions/5442658/spaces-in-urls .. Now *here i am not having any login directly on running the application* sounds like you need some sort of authentication and authorization system in place to restrict access. Or maybe just tell the employees not to click there. – Nico Mar 06 '17 at 06:04
  • yes it is the actual url that i have in master page but there is no login page on running the application the user can see the three tabs home,Employee Leave Detail Report and ProjectWise Reports.So i need to restrict ProjectWise Reports access to Employees because it should not be viewed by employees – abc Mar 06 '17 at 06:08
  • If only part of the application needs to be access-restricted, consider adding users and sessions to that part of the application. – Mathieu K. Mar 06 '17 at 06:18
  • How to do that restriction – abc Mar 06 '17 at 06:23
  • How are you determining whether the user is an employee with access restrictions, or someone with access permission? – JMadelaine Mar 06 '17 at 06:27
  • based on his system login – abc Mar 06 '17 at 06:30
  • in that case you could add the users who are allowed to use that page into an Active Directory group, and when the page loads, check if the current user is a member of the group. If not, then redirect them back to home page, or display and error message (or whatever you like). You can easily google how to check AD Group membership in ASP.NET – ADyson Mar 06 '17 at 09:19

0 Answers0