473,797 Members | 3,204 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 22 '05 #1
3 1393
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 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************ ***********@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 22 '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 22 '05 #4

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

Similar topics

3
2015
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
2282
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?
9
2009
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 app the rights to post files to the vir dir. Thanks
3
2585
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
1137
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
3506
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
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9537
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
10469
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10209
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10023
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...
1
7560
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6803
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();...
2
3750
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2934
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.