February 15th, 2010, 12:25 AM
How to programtically(VB.net) create new website & vir dir on remote IIS server
We are having IIS 6.0 and I want to automate my routine task of creating website on remote server.i.e. want to write a program in VB.net to automate this routine task:
Common steps are
(a) Create a new site.
(b) Note down the identification number (get information about the ID generated as this will be used to create virtual directory)
(c) Create virtual directory
(d) Assigned site to existing Application pool and
(e) Sometime create new application pool
I want to achieve above through a program in VB.net.
How to start and from where I can get information?
I tried to look at following link.
But failing to understand especially how to create stuff on remote server?
A sample program would be helpful.
February 15th, 2010, 08:21 PM
Typically you create a site on a local server then upload to a remote server.
I haven't used newer Visual Studio, VS6 you could install server components that would let you use visual studio development tools directly on the remote server.
There was an article in Windows IT Pro magazine a few months ago about IIS administrative scripting with lots of example scripts, maybe you can dig that article up for some more ideas.
It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi
February 15th, 2010, 10:30 PM
Let me explain the query with example;
I have to create a site 'test' on 2 web server web1 and web2.
Web1 IP = 10.00.00.1
Web2 IP = 10.00.00.2
So i go to the web1 and create new site manually i.e. through II manager.
In site creation i assign site a IP address say 10.01.01.01, code directory path and create 2 virtual directory.
Then i connect to web2 through IIS manager. Again assign site a IP address say 10.02.02.02, code directory (path on web2) and create 2 virtual directory.
I have to create number of site in a day and i want to automate above steps by writting program in vb.net.
Note: i can use command line and scripts but i have some other requirement which is already program in vb.net. So i want information about how to achieve above using vb.net code.