WCF 服务、应用程序域和网站

发布于 2024-09-30 01:05:18 字数 356 浏览 3 评论 0原文

我有许多 WCF 服务(SVC 文件),并且我想将它们托管在 IIS 中。 我想知道:

  • 在自己的网站上创建每个网站是否更好?
  • 或者让它们一起生活在同一个网站上?

有什么区别?

我读到每个服务都有自己的应用程序域? 是否有任何文章描述 WCF 服务和应用程序域之间的关系?

I have many WCF services (SVC files), and I want to host them in IIS.
I was wondering:

  • Is it better to create each one on its own web site?
  • Or have them all together live on the same web site?

What is the difference?

I read that each service will have its own Application Domain?
Is there any articles that describe the relation between a WCF service and an Application Domain?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

傲鸠 2024-10-07 01:05:18

应用程序域用于隔离应用程序,使应用程序互不影响。因此,为每项服务建立一个单独的网站可提供更高的容错,并允许您更新只改变服务,不影响其他服务。然而部署需要更多的工作。此外,可能会消耗更多的资源,并且初始化将花费更长的时间(因为将创建更多的应用程序域),但如果这不是时间或性能关键的应用程序,那么您可能不会太关心这些。

我认为,如果您的服务之间有很好的分离,您的服务具有(主观上)合理的复杂性,并且由此产生的开销对您来说可以忽略不计,那么最好选择单独的网站,否则就不要。 (是的,总而言之,这取决于情况。)

注意:您可能还想看看这篇文章:
将多个 WCF 服务作为一项服务托管

An application domain is used to isolate applications so that they do not affect each other. Having a separate website for each service therefore offers higher fault-tolerance, and enables you to update only the changing service without affecting the others. However deployment will require a little more work. Also probably more resources will be consumed and initialization will take a little longer (since more application domains will be created), but if it's not a time or performance-critical application those may not be of much concern to you.

I think if there's a good separation between your services, your services have a (subjectively) reasonable complexity and the resulting overhead is negligible for you, it would be better to go for separate websites, otherwise not. (Yeah, in summary, it depends.)

Note: You might also want to take a look at this article:
Hosting multiple WCF services as one single service

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文