Bundle配置在部署后无法在IIS上运行 [英] Bundle config not working on IIS after deployment

查看:62
本文介绍了Bundle配置在部署后无法在IIS上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Friends,



我在VS2012 - 4.5中创建了一个新的ASP.NET WebForm应用程序(不是MVC)。具有以下功能。

- 捆绑配置

- Web API(带路由)

- Angular JS

所有AngularJS控制器和其他Javascript& CSS文件在Bundle Config中注册。



从开发人员机器上,应用程序运行正常。

但是,在部署已发布的构建版本时IIS,Bundle配置未执行,因为CSS和javascript没有被应用。



任何人都可以指导我,如何克服这个问题。



提前致谢



我的尝试:



1.< modules>中对web.config文件的更改部分

 System.Web.Optimization 

解决方案

你启用

 BundleTable.EnableOptimizations = true; 



在BundleConfig类中


找到解决方案。



缺少Nuget包 - 'WebGrease'。



添加此包后,发布版本在IIS上运行正常。

Hello Friends,

I have created a new ASP.NET WebForm application (NOT MVC) in VS2012 - 4.5. with the following features.
- Bundle configuration
- Web API (with Routing)
- Angular JS
All the AngularJS controller and other Javascript & CSS files are registered in Bundle Config.

From the developer machine, the application works fine.
But, When deployed a published build on IIS, Bundle config not executed due to which CSS and javascript not get applied.

Can anyone please guide me, how to overcome this issue.

Thanks in advance

What I have tried:

1. Changes on web.config file in <modules> section with

System.Web.Optimization

.

解决方案

Have you enable

BundleTable.EnableOptimizations = true;


In BundleConfig class


Found the solution.

Missing Nuget Package - 'WebGrease'.

After adding this package, Publish version is working fine on IIS.


这篇关于Bundle配置在部署后无法在IIS上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆