Visual Studio built-in "IIS" component extraction and secondary development

Source: Internet
Author: User
Tags webhost
Introduction

After Visual Studio is installed, it will bring a small "IIS" server. In this article, we will extract this component and create a small "IIS" server.
For example, if IIS is not installed on the server or Asp.net is displayed to the customerProgramThe client is not installed with IIS, the client is not installed with IIS, or the client is not installed with IIS, and so on. On the premise, or you want to quickly disable IIS, you can right-click a dynamic program to run it. It is very practical (note that the net framework environment is required for the machine to be used ).

Use

Implementation Principle

After vs is called to install the automatic webdev. webserver20.exe component, the following command is called: webdev. webserver20.exe/port: Port Number/path: "file physical path"/vpath :"/"

Implementation Method

System Program directory:

1. Extract two components from the vs installation package
A. webdev. webhost. dll
Path: % WinDir % \ Assembly \ gac_32 \ webdev. webhost \ (under the folder)
B. webdev. webserver20.exe (or webdev. webserver40.exe 4.0)
Path:
Webdev. webserver. EXE path under vs2008:
C: \ Program Files \ common files \ microsoft shared \ devserver \ 9.0 \ webdev. webserver. exe
Path under vs2010 bit64:
C: \ Program Files (x86) \ common files \ microsoft shared \ devserver \ 10.0 \ webdev. webserver20.exe
C: \ Program Files (x86) \ common files \ microsoft shared \ devserver \ 10.0 \ webdev. webserver40.exe
2. Add system shortcut menu (shortcut key) related
A,Add RegistryCode(Batch processing ):

 
@ Echo offset batpath = % ~ Sdp0main. Bat "" % 1reg add hkey_classes_root \ directory \ shell \ Run smalliis \ command/ve/T REG_SZ/d % batpath %

B,Uninstall Registry Code (batch processing ):

 
Reg Delete hkey_classes_root \ directory \ shell \ Run smalliis/F

3. Main System calling component theme code (batch processing)

 
@ Echo offset/P myport = enter the port number: Start % ~ Sdp0webdev. webserver20.exe/port: % myport %/path: % 1/vpath: "/" Start http: // localhost: % myport %/: Echo Port: % myport %:: Echo Port: % 1: Pause
Summary

You can download the source code for a friend who needs it:Http://pan.baidu.com/share/link? Required id = 78820 & UK = 590309421 if you think it is helpful, click support. Thank you!

 

 

 

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.