IIS 网络用户帐户可以调用在不同帐户下运行的 WCF 服务吗?

发布于 2024-08-02 07:38:36 字数 229 浏览 1 评论 0原文

我目前正在研究使用 WCF 在服务器和充当遗留系统外观的程序之间进行通信。

快速概述:用户<-> ASP .NET 网页<-> WCF<->门面程序<->遗留系统

我不想以运行外观程序所需的权限来运行 IIS,因此我正在考虑使用 WCF 在两个软件之间进行通信。

这可能吗?我是否应该使用 WCF 以外的其他方式在两个 .NET 项目之间进行通信?

I'm currently looking into using WCF to communicate between a server and a program that acts as a facade for a legacy system.

Quick overview: user <-> ASP .NET web pages <-> WCF <-> facade program <-> legacy system

I don't want to run IIS with the rights required to run the facade program so I was thinking about using WCF to communicate between the two pieces of software.

Is this possible? Should I be using something other than WCF to communicate between the two .NET projects?

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

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

发布评论

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

评论(3

酒几许 2024-08-09 07:38:36

我没有看到这种方法有任何直接问题 - WCF 通常是 .NET 中进程间/机器间通信的最佳选择,因为它通过配置支持大量选项。

在验证 IIS 方面 -> WCF 服务,您可以使用 WCF 客户端代理提供的默认 Windows 身份验证启动。 IIS 将使用网络服务凭据连接到 WCF 服务,该凭据应在同一台计算机上自动进行身份验证。

如果您在另一台计算机上托管 WCF 服务,则需要使用 DOMAIN\COMPUTERNAME$ 形式的计算机帐户名称将 IIS 计算机上的网络服务帐户映射到托管该服务的计算机。

或者,您可以在客户端代理上为特定域帐户初始化您自己的 NetworkCredentials 实例。这不太安全,因为您必须在代码中包含密码,但在实践中它往往更容易使用。

WCF 服务宿主进程可以使用不同的进程标识运行,并使用该进程标识来执行下游组件。

I don't see any immediate issues with this approach - WCF is generally the best choice for inter-process / inter-machine communication in .NET due to the vast array of options it supports via configuration.

In terms of authenticating IIS -> WCF service, you could just start with default Windows authentication provided by the WCF client proxy. IIS will connect to the WCF service using Network Service credentials, which should authenticate automatically on the same machine.

If you are hosting the WCF service on a different machine you will need to map the Network Service account on the IIS machine to the machine where the service is hosted using the computer account name which is in the form DOMAIN\COMPUTERNAME$.

Alternatively, you can initialize your own NetworkCredentials instance on the client proxy for a specific domain account. This is less secure as you have to include the password in your code, but it tends to be easier to use in practice.

The WCF service host process can run using a different process identity, and use that process identity for executing downstream components.

给不了的爱 2024-08-09 07:38:36

我会做一个套接字连接。前端监听端口,.NET 网页连接到它并交易数据......完全不用担心用户级别。

I would do a socket connection. Frontend listening to a port, the .NET web page connect to it and trade data... no worries about user level at all.

风轻花落早 2024-08-09 07:38:36

帐号应该没有什么关系。

The account shouldn't matter at all.

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