简体   繁体   English

ASP.NET脚本捆绑返回捆绑文件,但带有404响应代码

[英]ASP.NET Script Bundling returns bundled files but with 404 response code

I have an c# ASP.NET web application. 我有一个c#ASP.NET Web应用程序。 I have enabled JS bundling and everything seems to be configured (I have also checked a lot of stackoverflow similiar errors) 我启用了JS捆绑功能,并且似乎所有内容都已配置(我还检查了很多stackoverflow类似错误)

If I put the JS bundled file URL in a browser I get a response with all the JS files together and optimized but the http response code is 404, so when I use the url with script tag in my html page, the 404 response code avoid the web loadoing the JS file. 如果将JS捆绑文件的URL放在浏览器中,我会得到所有JS文件的响应并进行了优化,但是http响应代码是404,所以当我在html页面中使用带有script标签的url时,404响应代码避免了在网络上加载JS文件。

Has someone faced something similar? 有人面对过类似的事情吗?

Regards. 问候。

Well, I finally discover the problem. 好吧,我终于发现了问题。

I am using a library for developing web portal (Microsoft Adx Studio) for Microsoft Dynamics and one of the modules (PortalRoutingModule) was intercepting the requests and returning 404 for bundling urls 我正在使用一个库来开发用于Microsoft Dynamics的Web门户(Microsoft Adx Studio),并且其中一个模块(PortalRoutingModule)正在拦截请求并返回404以绑定网址

Thanks anyway :) 不管怎么说,还是要谢谢你 :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM