Favorites (Create Windows2000server site with asp.net (VB version))
Source: Internet
Author: User
Using asp.net (VB) to create a Web site, we call the way is very simple:
Dim test as New Class1 ()
Test. Createwebsit (Webname,port, "d:vb", "localhost")
Here is the code for CLASS1, which does the job of setting up a site and automatically overwrites the name of the site (note: This class needs to refer to the Actice DS type Library)
Public Class Class1
with 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 Active Desktop ' (IADS) object. First of all, in VB ' Prject ' menu in ' references ' in ' The Active DS ' Type ' library component
Dim Wwwserver as Activeds.iads
Dim WWWService
Dim Wwwvdir, WWWVdir2, wwwvdirres as Activeds.iads
Dim I as Integer
Dim Handlesamecase as Boolean
' Access to W3SVC services
WWWService = GetObject ("iis://" & ComputerName & "/w3svc")
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