简体   繁体   English

如何使程序在网络上“可发现”?

[英]How do I make a program “discoverable” on the network?

Hey guys, I was working on a simple chat program to brush up on my C#, and ran into a roadblock. 大家好,我正在开发一个简单的聊天程序来刷我的C#,并遇到了障碍。 I wanted to allow one computer to broadcast its location, and the other to find that computer, and display it (and any others) in a list.. Just a push in the right direction would be great, Thanks, Max 我想允许一台计算机广播其位置,另一台计算机找到该计算机,并在列表中显示它(和其他任何计算机)。只需向正确的方向推动就可以了,谢谢,马克斯

Mono.Zeroconf is a .NET library that provides common zeroconf opertations - service publish and discovery. Mono.Zeroconf是一个.NET库,提供常见的zeroconf操作-服务发布和发现。 It uses Apple's Bonjour for Windows as a transport on Windows. 它使用Apple的Windows Bonjour作为Windows上的传输工具。

Developers can publish services that will be exposed to other computers on the local network and also query the local machines on the network for services that could have been exposed. 开发人员可以发布将公开给本地网络上其他计算机的服务,还可以查询网络上的本地计算机以获取可能公开的服务。

All you need is to share destination PC. 您只需要共享目标PC。 and then run your web-based application on the target pc IIS. 然后在目标pc IIS上运行基于Web的应用程序。


Updated Part : 更新部分:

If you have awindows application and want users use that application youhave some solution 如果您有Windows应用程序,并且希望用户使用该应用程序,那么您有一些解决方案

  1. create a Login form for your application 为您的应用程序创建一个登录表单
  2. use from MarshalByRef object and create a Channel between user andaplication 从MarshalByRef对象使用并在用户和应用之间创建一个Channel
  3. create a MSI (setup) and run it from server (in entire Active Directory).this will install one application in each client 创建一个MSI(设置)并从服务器(在整个Active Directory中)运行它。这将在每个客户端中安装一个应用程序
  4. create a simple dot net setup. 创建一个简单的点网设置。 justRight click onyour windowsproject in VS and then select Publich, in the wizard walk through creating a network application 只需右键单击VS中的Windows项目,然后选择Publich,在向导中逐步创建网络应用程序

I think the last option is closest one to your request 我认为最后一种选择最接近您的要求

Use AD (Active Directory)? 使用AD(Active Directory)? Or some such [which would serve as] central messageboard mechanism - maybe even MSMQ? 还是某些(将用作)中央留言板机制-甚至MSMQ?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM