473,385 Members | 1,531 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,385 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 22 '05 #1
3 1373
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 22 '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 22 '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 22 '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...
9
by: TPS | last post by:
I have a virtual directory where all posted files are stored. The ASP app does not have rights to the share on the other server where the vir dir resides. What is the best way to give the asp...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.