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
Post a Comment