A simple WebServer Program

Source: Internet
Author: User

Now the IT management of this company really does not know what to say, I am mainly engaged in. Net development, the company's computer configuration is still win7, but they do not have the permission to install iis, it also refuse to install, want to play web security is not good. Therefore, we decided to develop a window form program. In fact, I used a blog post to develop a custom web IIS server WebDev. WebHost to use the console to hold up the web service for a detailed introduction, except that it is a console program. But that program is a problem on my current computer. Problem code:

IPHostEntry hosts = IPAddress address = hosts. AddressList [0
. _ SocketIpv4 =. CreateSocketBindAndListen (AddressFamily. InterNetwork, address,

. The final modification code is as follows:






This. _ socketIpv4 = this. CreateSocketBindAndListen (AddressFamily. InterNetwork, address, this. _ port );

Browser running result:

A tray is added,

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.