asp.net web api - "The extension '.cshtml' may be incorrect." error while angularjs loads templateurl -


the code looks

directivemodule .directive('bookdetail', ['$compile', '$timeout', function ($compile, $timeout) {     return {         restrict: 'e',         replace: true,         scope: {          },         link: function (scope, element, attr) {          },         templateurl: 'areas/app/directives/book/bookdetail.cshtml',         controller: 'bookcontroller'     }; }]); 

when angular app loads throws following exception ,

[$compile:tpload] failed load template: /areas/app/directives/book/bookdetail.cshtml (http status: 403 forbidden)

what wrong ?

i got similar situation recently. forgot update line in web.config

<add key="webpages:enabled" value="false" />  

since page trying load .cshtml iis chocks on it. removing line web.config or turning value true solve issue.


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -