Disallow Direct Access to Admin Directory

We have a directory named Admin in the root folder of an (4.0) web application.

I have created a route to the Admin/Dashboard.aspx


and it works fine.

I was curious if I could disallow to run the file through direct access, even to the administrators.


Is it doable?

Please help.


You can do with some web.config setting like below

<location path="~/Admin/Dashboard.aspx">
<allow roles="admin"/>
<deny users="*"/>

Need Your Help

Unix: Getting execl functions to read from stdin

c unix stdin pipe

I'm having trouble calling execl with "/usr/bin/sort" in a C program I'm writing. The call to sort doesn't seem to be reading from stdin or printing any output. Code below:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.