473,326 Members | 2,048 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,326 software developers and data experts.

Creating a suimple virtual directory with default rights

I have a web site called www.test.com

I have a folder under the wwwroot called \testfolder\

How do I turn \testfolder\ into a virtual directory.

I don't need rights and settings, I've figured that part out, I just get
lost setting up the "System.DirectoryServices.DirectoryEntry" and then
executing the childern.add()
Nov 20 '05 #1
3 1109
On Wed, 16 Jun 2004 09:05:42 -0400, "Microsoft" <ma*@mas.com> wrote:

¤ I have a web site called www.test.com
¤
¤ I have a folder under the wwwroot called \testfolder\
¤
¤ How do I turn \testfolder\ into a virtual directory.
¤
¤ I don't need rights and settings, I've figured that part out, I just get
¤ lost setting up the "System.DirectoryServices.DirectoryEntry" and then
¤ executing the childern.add()
¤

See if the following helps:

Creating Sites and Virtual Directories Using System.DirectoryServices
http://msdn.microsoft.com/library/de...ryservices.asp
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 20 '05 #2
Great Thanks
but
what Does serverID in DirectoryEntry root=new
DirectoryEntry("IIS://localhost/W3SVC/" + serverID + "/Root"); mean

Its not server name again is it?

"Paul Clement" <Us***********************@swspectrum.com> wrote in message
news:fd********************************@4ax.com...
On Wed, 16 Jun 2004 09:05:42 -0400, "Microsoft" <ma*@mas.com> wrote:

¤ I have a web site called www.test.com
¤
¤ I have a folder under the wwwroot called \testfolder\
¤
¤ How do I turn \testfolder\ into a virtual directory.
¤
¤ I don't need rights and settings, I've figured that part out, I just get ¤ lost setting up the "System.DirectoryServices.DirectoryEntry" and then
¤ executing the childern.add()
¤

See if the following helps:

Creating Sites and Virtual Directories Using System.DirectoryServices
http://msdn.microsoft.com/library/de...ryservices.asp

Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)


Nov 20 '05 #3
On Wed, 16 Jun 2004 11:07:39 -0400, "Mas G" <no**@none.com> wrote:

¤ Great Thanks
¤ but
¤ what Does serverID in DirectoryEntry root=new
¤ DirectoryEntry("IIS://localhost/W3SVC/" + serverID + "/Root"); mean
¤
¤ Its not server name again is it?

You have to query IIS in order to determine the server instance for the default web site. Here is
some simple VB code to do this:

Function FindInstanceIDForSite() As Integer

Dim intServerID As Integer
Dim objIIS As Object

On Error Resume Next

For intServerID = 1 To 512
Set objIIS = GetObject("IIS://Localhost/w3svc/" & intServerID)
If (Err.Number <> 0) Then
FindInstanceIDForSite = intServerID
MsgBox objIIS.ServerComment
Exit Function
End If
Next

FindInstanceIDForSite = 0

End Function
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 20 '05 #4

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

Similar topics

3
by: dave | last post by:
I am using vs.net 2003 on windows xp. After clicking on a project within my solution and selecting create new folder vs.net responds back with , the "directory already exists". If i look at the...
0
by: Ken Wigle | last post by:
All, I am trying to add some .net applications I wrote to a virtual directory underneath the sharepoint services web site. I am having some problems and wondering if a) this is possible and/or...
1
by: gan | last post by:
I created a ASP.NET web setup project with the project name "Setup". I noticed that this name will be used as the default Virtual Directory name during deployment. I'd like to know whether we...
2
by: Henrik Dahl | last post by:
Hello! I've made a WebService which has the name MyWebService. Now I make a setup project for it. The name of the setup project is MyWebServiceInstaller. The default name for the virtual...
3
by: rfontaine | last post by:
I have a virtual directory on IIS 5.0 to a remote share on a Windows 2003 file server. The "connect as" is a domain user account. The share as read permission for everyone and the NTFS permission...
7
by: Jaydeep | last post by:
Hi, Anybody knows how to create virtual directory programmatically under root directory ofcourse from code-behind. I am developing web-based application where I need to create a folder and making...
3
by: Microsoft | last post by:
I have a web site called www.test.com I have a folder under the wwwroot called \testfolder\ How do I turn \testfolder\ into a virtual directory. I don't need rights and settings, I've...
5
by: Sam777 | last post by:
I was under the impression that creating the app_offline.htm file at the root of the webapp would cause all handles to be closed so that the app could be removed. Unfortunately, this isn't the...
15
by: David Thielen | last post by:
Hi; My ASP.NET app (C# calling J# under .net 2.0) creates a png file in a subdirectory to display as part of the created page. However, the bitmap will not display due to a security violation. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.