bundle在应用启动时出现异常
本文关键字:异常 启动 应用 bundle | 更新日期: 2023-09-27 17:54:01
我有一个ASP。. NET MVC应用程序。所有脚本都像往常一样在bundle中。这是我的代码从BundleConfig.cs
bundles.Add(new ScriptBundle("~/bundles/public-js").Include(
"~/Scripts/angular.min.js",
"~/Scripts/angular-route.min.js",
"~/Scripts/angular-resource.min.js",
"~/Scripts/angular-cookies.min.js",
"~/Scripts/angular-sanitize.min.js",
"~/Scripts/angular-ui/ui-bootstrap-tpls.min.js",
"~/Scripts/bootstrap.min.js",
"~/Scripts/string.utilities.js",
"~/Scripts/public/google-charts-loader.js",
"~/Scripts/biz/core/app-config.js",
"~/Scripts/public/core/db-api.js",
"~/Scripts/public/core/app.js",
"~/Scripts/public/core/directives.js",
"~/Scripts/public/core/controller-helpers.js",
"~/Scripts/public/core/public-controller-helpers.js",
"~/Scripts/public/core/services.js",
"~/Scripts/public/core/list-controller.js",
"~/Scripts/public/core/item-controller.js",
"~/Scripts/n.utilities.biz.js"
));
根据IntelliTrace,我有一个异常,被捕获和处理的系统。这里的异常描述是
Exception thrown: 'System.Web.HttpException' in System.Web.dll (": Invalid file name for file monitoring: 'C:'IISTest'SuperMVC'Scripts'public'. Common reasons for failure include:
- The filename is not a valid Win32 file name.
- The filename is not an absolute path.
- The filename contains wildcard characters.
- The file specified is a directory.
- Access denied.)
应用程序继续正常工作,没有错误。为什么在应用程序启动时出现此错误?
在我看来,它抛出不是由用户(您的)应用程序代码。你在Tools -> Options -> Debugging -> Enable Just My Code
中击中点了吗?还有一个有趣的地方有CLR例外:Debug -> Windows -> Exception Settings -> CLR Exceptions
,这是在VS2015。