多个Asp.Net项目之间的共享代码 [英] Shared Code Between Multiple Asp.Net projects

查看:77
本文介绍了多个Asp.Net项目之间的共享代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在同一服务器上的多个Web应用程序之间共享bin文件夹和dll及其他资源文件(如CSS)的最佳实践是什么?

What's the best practice to share the bin folder and dlls and other resource files (like css) between multiple web applications on the same server?

我已经将通用代码分离到了自己的程序集中,但是我想知道部署等问题.我基本上想将所有通用文件都放在Web服务器上的一个位置,然后让每个Web应用程序引用那个共同的位置.

I've already separated out the common code into their own assemblies, but I'm wondering about deployment, etc. I basically want to have all the common files located in ONE location on the webserver, and then have each web app reference that common location.

目前,我不确定如何告诉Asp.net网站从其他位置使用bin文件夹.

Currently I'm not sure how to tell an Asp.net website to use the bin folder from a different location.

如果有什么不同,这些都是ASP.NET MVC应用程序.

If it makes any difference, these are ASP.NET MVC applications.

感谢您的帮助.

推荐答案

我使用以下技术:我有多个带有ascx控件,资源等的ASP.net应用程序项目...我已经实现了虚拟路径提供程序来解析这些应用程序之间的虚拟路径.效果很好.我还实现了特殊的http处理程序,以使文件可下载.如果需要样本,请查看 liveui 源代码.

I use the following technique: I have multiple ASP.net application projects with ascx controls, resources and so on...I've implemented virtual path provider to resolve virtual paths between these applications. It works very well. I've also implemented special http handler to make files downloadable. If you need samples, look at liveui source code.

这篇关于多个Asp.Net项目之间的共享代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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