Abhishek
Abhishek

Reputation: 191

Reduce security from views folder MVC

In my views folder i want to use templates from jsrender but when i try to access anything from the Views folder it gives me 404 and 500 error as response not found.

What i just want to do is to access *. HTML file from the Views folder.

What should be the change in Web.Config of Views?

Thanks

Upvotes: 1

Views: 34

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1038850

What i just want to do is to access *. HTML file from the Views folder

No, you can't. The Views folder has a special meaning in ASP.NET MVC and there's a handler which forbids access to any file in it. You just have to put your templates somewhere else. A ~/Templates folder doesn't seem like a bad idea.

Upvotes: 2

Related Questions