views:

19

answers:

3

I have a directory in my website called /MyFiction. It is an installed version of Wordpress for a particular blog and I would like to keep it to where you can only get to it if you're authenticated. I'm an old hat to ASP.NET but with MVC I'm still a newbie....

+1  A: 

You could still use the <location> element in your web.config to restrict access to certain folders.

Darin Dimitrov
+2  A: 

Set the directory up in your web.config the way you would with standard ASP.NET, but make sure to ignore the route in your MVC web site via Application_Start.

 routes.IgnoreRoute("/MyFiction/{*pathInfo}");
tvanfosson
+1  A: 

I'm not sure if I'm right here, but have you tried dropping a web.Config file in the directory with permissions content?

@tvanfosson said it right. Standard Web Forms authentication is still valid as long as you remove the directory from your Routes.

rockinthesixstring