473,387 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how to create a IIS virtual directory programmatically??

I want to write a web hosting application. But how to create a IIS virtual
directory programmatically in ASP page??

please advise!
Thanks!
Jul 19 '05 #1
2 7077
Take a look at:

Start--Run---CMD--enter

cscript %systemdrive%\inetpub\adminscripts\mkwebdir.vbs -help

Ray at home

"Matt" <ma*******@hotmail.com> wrote in message
news:e3**************@TK2MSFTNGP11.phx.gbl...
I want to write a web hosting application. But how to create a IIS virtual
directory programmatically in ASP page??

please advise!
Thanks!

Jul 19 '05 #2
'This will get you in the ball park!
Set Root = GetObject("IIS://LocalHost/W3SVC/1/ROOT")
if (Err.Number <> 0) then
wscript.Quit
end if
Set Dir = Root.Create("IIsWebVirtualDir", "Test")
Dir.Path = "C:\ "
Dir.AccessRead = True
Dir.AccessWrite = False
Dir.EnableDirBrowsing = False
Dir.AppFriendlyName = "Test"
Dir.SetInfo
Set Dir = Nothing
Set Root = Nothing

-dlbjr

Discerning resolutions for the alms
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Silvia | last post by:
My question is that is posible create a IIS Virtual Directory programmatically with visual Basic.NET?? Is posible create a Application Pool programmatically too? Thanks
0
by: Lan H. Nguyen | last post by:
I am trying to create a ftp virtual directory for every new user that registers using snippet code below and got an access denied error right on this line deRoot.RefreshCache(); I tried to have...
1
by: Danny | last post by:
Hi. I am using XCOPY-like deployment to install an ASP.NET XML Web Service. After I copy the files, I need to mark the virtual directory as an ASP.NET application. I know how to do this manually...
1
by: Matt | last post by:
I want to write a web hosting application. But how to create a IIS virtual directory programmatically in ASPX page?? please advise! Thanks!
2
by: BobAchgill | last post by:
I also asked this in the inetserver.iis.ftp forum... I would like some example VB .NET code that shows how to add a new FTP site in IIS and virtual directory with System.DirectoryServices. It...
5
by: ljlevend2 | last post by:
Is there any way to create a local server during runtime? For example, if you add an existing Web Site to a Solution from within Visual Studio (by right clicking the solution in the Solution...
8
by: JJ | last post by:
I'm confused about paths. I have a functionn that uses the mappath method, which I think requires a virtual path (is that the same as a relative path?). But this doesn't always work as the...
0
by: Crash | last post by:
..NET Framework 1.x, 2.x, 3.x... ASP.NET 5.0, 5.1, 6.0... Windows Server 2000, XP, Server 2003... I am using NAnt & the NAnt contrib library to automate virtual directory maintenance tasks on...
0
by: Brian Roisentul | last post by:
Hi All, I want to programmatically(c# fmw 2.0) create a folder under my IIS Web Site. I figured that I needed to create an entry in the IIS Metabase. So, after investigating a while and i...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.