如何通过C#在LAN上托管网页? [英] How do I Host Webpage over LAN from C#?

查看:93
本文介绍了如何通过C#在LAN上托管网页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

up vote

0

down vote

最爱





我有一个具有不同功能的C#表单应用程序。另外,我想向托管网页CameraCapture.html的现有项目添加另一项服务。将本地区域网页作为网络服务页面,以便从网络上的其他客户端查看。



为此,我添加了一个表单frm_cameraServer_monotor这个形式的两个按钮,btn_StartServer和btn_StopServer,它们开始提供服务CameraCapture.html。并停止服务。我在LAN上的IP地址是:10.140.191.200(静态)。



我不想使用像Apache和ISS这样的任何Web服务器进行安装和配置。我想要一个现有项目的服务器服务。

解决方案

您需要运行一个Web服务器。我不确定你为什么不想使用Apache或IIS,但是如果必须的话,请看看这些文章是否将Web服务器嵌入到你的应用程序中。



简单的C#Web服务器 [ ^ ]

C#Web服务器 [ ^ ]

up vote
0
down vote
favorite


I have a C# form application that has different functionality. Additionally I want to add another service to the existing project which is hosting the webpage "CameraCapture.html" page over Local Area Network as a web service in order to be viewed from another client on the Network.

For this purpose I have added one form "frm_cameraServer_monotor" and two Buttons in this form, btn_StartServer and btn_StopServer, which to start serving "CameraCapture.html" and to stop serving it. My IP Address on LAN is: 10.140.191.200 (static).

I don't want to use any web server like Apache and ISS to be installed and configured. Just I want a server service to existing project.

解决方案

You need to run a web server. I'm not sure why you wouldn't want to use Apache or IIS, but if you must, take a look at these articles for embedding a web server into your application.

Simple C# Web Server[^]
C# Web Server[^]


这篇关于如何通过C#在LAN上托管网页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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