Restrict access to views to debug only?

A crude way would be to use if DEBUG ... some code here #else ... some other code here #end if as : haacked.com/archive/2007/09/16/condition... and Is there an #IF DEBUG for Asp. Net markup?

A crude way would be to use #if DEBUG ... some code here #else ... some other code here #end if as : haacked.com/archive/2007/09/16/condition... and Is there an #IF DEBUG for Asp. Net markup?

That works, but I've decided its a bad idea. Better to not reinvent the wheel and use the built in authentication provider and filters. It just works better.

– CMP Jun 8 at 18:37.

AppHarbor now supports web. Config transformations so in your release or AppHarbor web. Config you could block those files or a folder in the web.config.

The entire page is public, so I don't need user authentication or anything like that, but there are administrative pages that only I should be able to access. Rather than have any kind of authentication page with a password, I would like certain views to be only accessible while I am running it locally in debug mode, but not once I have deployed to appharbor. Show or hide page elements (links) based on whether it is running locally or on the server.

Restrict access to entire views (return 403) if the application is running on appharbor. How would I read and apply these settings in my views and controllers?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions