如何使用 Cassini 进行 IIS 风格的压缩?
我在生产 IIS 中打开了 http 压缩。 有没有办法在 Cassini Web 服务器(VS200x 附带)中打开它?
原因是我得到了倾斜的性能结果,并且希望我的开发环境中的带宽能够反映生产环境中的带宽。
这可能吗?
I have http compression turned on in my production IIS box. Is there a way to turn it on in the Cassini web server (that comes with VS200x)?
The reason for this is that I am getting slanted performance results and would like the bandwidth in my dev environment to mirror that of production.
Is this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我知道如何做到这一点的唯一方法是您实现自己的 压缩直接处理此问题的模块,而不是依赖服务器,您可以从 Cassini 中获得压缩。 如果您希望服务器透明地为您处理此问题,我认为卡西尼号不是为此构建或设计的。
the only way I know how to do it is ff you implement your own Compression Module that handles this directly instead of relying on the server you can get compression out of Cassini. If you want the server to handle this for you transparently, I don't think Cassini is built or designed for this.
您可以自己验证这是不可能的,源代码是公开的。
You can verify for yourself that it isn't possible, the source code is public.
显然您没有遵循最佳实践。
您需要在开发阶段之后设置测试环境。 该测试环境必须与您的部署盒完全相同。 然后您可以模拟测试盒的流量以发现问题。 测试完成后,就可以开始部署了。
Cassini仅用于开发目的,因此将其用于测试目的是没有意义的。
Obviously you are not following the best practices.
You need to set up a test environment after the dev phase. This test environment must be exactly the same as your deployment box. Then you can simulate traffic to the test box in order to find issues. Once tests are done, you can start to deploy.
Cassini is only for dev purposes, so it is meaningless to bring it for test purposes.