[英]Angular code working in Visual Studio but not in IIS
I have created a project with MVC and Angular.js My app works fine from visual studio.我用 MVC 和 Angular.js 创建了一个项目我的应用程序在 Visual Studio 中运行良好。 But when I Publish it in IIS i get error messages in console saying there are some issues in angular.min.js file.
但是当我在 IIS 中发布它时,我在控制台中收到错误消息,说 angular.min.js 文件中存在一些问题。
Console error is: Unknown provider: nProvider <- n控制台错误是:未知提供者:nProvider <- n
I have tried to publish code both in debug and release modes.我试图在调试和发布模式下发布代码。 Nothing is working.
没有任何工作。 It is working fine from the visual studio.
它在视觉工作室工作正常。
[ [
I faced a similar problem and found that when I try to access the angular.min.js directly in the browser file then it was giving an error,我遇到了类似的问题,发现当我尝试直接在浏览器文件中访问 angular.min.js 时出现错误,
base_url/node_modules/angular/angular.min.js
HTTP Error 404.8 - Not Found
The "request filtering module" is a feature in IIS 7 and above. “请求过滤模块”是 IIS 7 及以上版本中的一个功能。 When IIS rejects a request based on this feature, the error code logged is 404.8.
当 IIS 拒绝基于此功能的请求时,记录的错误代码为 404.8。 This feature allows you to define which segments are "Servable".
此功能允许您定义哪些段是“可服务的”。
If this is the error you are facing then follow these steps to resolve it.如果这是您面临的错误,请按照以下步骤解决它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.