以编程方式从 PC 提供数据的选项

发布于 2024-12-21 04:58:27 字数 178 浏览 3 评论 0 原文

我正在开发一个 .Net 应用程序,它将通过 WiFi 网络从 PC 向移动设备提供文件和其他结构化数据。

这样做的标准方法是什么?我的第一直觉是将 PC 视为 Web 服务主机,但我不希望用户为此目的托管 Web 服务器。

这就是 Bonjour 的用途吗? PC 友好程度如何,或者有任何明显的替代方案吗?

I'm working on a .Net application which will serve files and other structured data to mobile devices from a PC, over a wifi network.

What are standard ways of doing this? My first instinct is to think of the PC as a web service host, but I don't want to have users host a web server for this purpose.

Is this what Bonjour can be used for? How PC friendly is that, or are there any obvious alternatives?

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

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

发布评论

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

评论(1

哆啦不做梦 2024-12-28 04:58:27

brianestey 建议使用 SMB 共享,但是这些通过系统级文件系统导出代码进行处理,这些代码基本上以管理员级别权限执行。我确信微软在过去的五六年里已经竭尽全力真正提高了这一层的安全性,但放弃的特权似乎仍然有点太多。

相反,在主机上运行 Web 服务器允许您为运行 Web 服务器的任何帐户配置文件系统和系统权限,从而允许您根据 最小权限原则,并约束软件中可能存在安全缺陷的结果。

当然,如果您只是要以管理员身份运行 Web 服务器,那么这可能是一个没有实际意义的问题 - 您需要问自己,您认为谁可以更好地编写安全软件,Apache 还是 Microsoft。

brianestey recommends using SMB shares, but those are handled via system-level filesystem exporting code, which are executing with essentially administrator level privileges. I'm sure Microsoft has gone to great lengths in the last five or six years to really improve the security of this layer but it still seems a bit too much privileges to give away.

Instead, running a web server on the host allows you to configure the filesystem and system privileges for whatever account runs the web server, allowing you to confine the web server according to the Principle of Least Authority, and constrain the results of possible security flaws in the software.

Of course, if you're just going to run the web server as Administrator, then it is probably a moot point -- you need to ask yourself who you think can do a better job writing secure software, Apache or Microsoft.

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