Mir Ishaq

Mir Ishaq

  • NA
  • 5
  • 7.1k

Deny Users to acesss administrator pages by by direct copying url

Jul 4 2012 7:08 AM
Hi All

I have a application on which i want to stop users to navigate to admin pages which they can access by giving direct url. can any body please to help me.


i already tried the code

Collapse | Copy Code

<authentication mode="Forms">
<forms loginUrl="~/default.aspx" defaultUrl="~/default.aspx"></forms>
</authentication>


Collapse | Copy Code

<location path="Admin_Pages">
<system.web>
<authorization>
<allow users="admin_Pages"/>
<deny users="*"/>
</authorization>
</system.web>
</location>


in web config file.
But now the actual users also can not login button. after clicking login button they are redirecting the default page.