Add to Favorites (use ASP. NET (VB) to create a WINDOWS2000SERVER site)

Source: Internet
Author: User

For WEB sites created using ASP. NET (VB), our call method is very simple:
Dim test As New Class1 ()
Test. CreateWebSit (webname, port, "D: VB", "localhost ")
The following is the Class1 Code. The Code is used to create a site. If the site name is available, it is automatically overwritten (Note: Actice DS Type Library must be referenced in this class)
Public Class Class1
Use localhost
'================================
Function CreateWebSit (ByVal WWWSiteName As String ,_
ByVal WWWTCPPort As String ,_
ByVal WWWFilesPath As String ,_
ByVal ComputerName As String) As Boolean
CreateWebSit = True
Dim TCPPort () As Object
'Create an Active Desktop '(IADS) object. First, you must use the Active DS 'type' library component in 'references 'in the 'probject' menu of VB.
Dim WWWServer As ActiveDs. IADs
Dim WWWService
Dim WWWVdir, WWWVdir2, WWWVdirRes As ActiveDs. IADs
Dim I As Integer
Dim HandleSameCase As Boolean
'Retrieve the W3SVC Service
WWWService = GetObject ("IIS: //" & ComputerName & "/W3SVC ")

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.