在多个网站之间共享代码 [英] share code between multiple websites

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

问题描述

您好b $ b

我有一个在asp.net 2008中开发的门户网站。对于这个门户网站,有许多网站 - 每个客户一个。所有这些网站都具有相同的页面,页面控件和文件夹结构。我的问题是当我在一个站点上更新代码时,我需要在所有站点上更新相同的代码。



有没有办法在很多网站之间共享代码。通过共享我的意思是说我可以在网站之间共享代码(* .aspx.cs)。虽然我能够通过将bin添加到bin文件夹来共享所有这些站点中的类库(数据访问类库)。



问候

Aijaz

Hi
I have a portal developed in asp.net 2008. For this portal there are many many sites-one for each customer. All these sites are similar with same pages, controls on page and structure of folders. My problem is when i update code on one site, i need to update same code on all the sites.

Is there a way to share code between many websites. By sharing i mean to say can i share code behind (*.aspx.cs) files among sites. though i am able to share class library (data access class library) among all these sites by adding dll to bin folder.

Regards
Aijaz

推荐答案

那部分正在由您的所有网站进行更新。

您应该将该部分放入 Web服务/ WCF服务中,您只需要调用该服务(不是通过服务代理,而是通过跨域调用该服务)。

或使用 Web Api ,这比WebService / WCF服务更容易。



在这里,您只需要调用更新所有站点数据的服务。
The Part that is updating by all of your websites.
You should put that part in Web Service/WCF service and you just need to invoke the service(not by service proxy, but by cross domain call to that service).
Or use Web Api that is Quite easier compare to WebService/WCF service.

Here you just need to call that service that update data for all sites.


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

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