473,785 Members | 2,289 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Directo ryServices.Dire ctoryEntry" and then
executing the childern.add()
Nov 20 '05 #1
3 1135
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.Directo ryServices.Dire ctoryEntry" and then
¤ executing the childern.add()
¤

See if the following helps:

Creating Sites and Virtual Directories Using System.Director yServices
http://msdn.microsoft.com/library/de...ryservices.asp
Paul ~~~ pc******@amerit ech.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************ ***********@sws pectrum.com> wrote in message
news:fd******** *************** *********@4ax.c om...
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.Directo ryServices.Dire ctoryEntry" and then
¤ executing the childern.add()
¤

See if the following helps:

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

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


Nov 20 '05 #3
On Wed, 16 Jun 2004 11:07:39 -0400, "Mas G" <no**@none.co m> 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 FindInstanceIDF orSite() 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
FindInstanceIDF orSite = intServerID
MsgBox objIIS.ServerCo mment
Exit Function
End If
Next

FindInstanceIDF orSite = 0

End Function
Paul ~~~ pc******@amerit ech.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
2014
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 virtual directory on my pc the directory does not exist. If i create the folder from explorer then select hide/show files within vs.net I see the directory I just created. When I include that directory in my project by right clicking and selecting...
0
2281
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 recommended and b) if there is another way. I want to add the projects under the sharepoint site as I want authentication but do not want my users to have to login everytime they access a net app from within the sharepoint site. Ideally, they...
1
2793
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 can change this default value while preserving the project name? Thanks in advance
2
1384
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 directory created by the setup program is MyWebServiceInstaller but I would like it to be MyWebService. Is there a way to have the setup to install MyWebService having the virtual directory MyWebService instead of MyWebServiceInstaller?
3
2583
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 is set so the user as access to the directory. I get the stop sign with the status "logon failure: the user has not been granted the request type logon" The local policies on the file server for allow access from the network contains the...
7
2397
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 this folder as virtual directory in IIS. I know in ASP how to do it. Set objIIS = GetObject("IIS://localhost/W3SVC/1/Root") objIIS.Create("IISWebVirtualDir", strVirtualDirectoryName)
3
1393
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 figured that part out, I just get lost setting up the "System.DirectoryServices.DirectoryEntry" and then executing the childern.add()
5
3504
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 case. One handle remains open. Debugging shows that it's actually the IIS cache and not ASP.NET that owns this handle. During IIS shutdown, the handle is closed with the following stack trace: ChildEBP RetAddr 0006fbe4 5a403e05...
15
2837
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. Everything is the default settings I believe. IIS is running under Local System. In IIS the DefaultAppPool is running under Network Service. Annonymous access uses the account IUSR_JASMINE (machine name is Jasmine).
0
9489
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9959
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5396
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4063
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2893
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.