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,