473,394 Members | 1,750 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,394 software developers and data experts.

Get URL to newly created Virtual Directory

I created virtual directory in my custom setup project successfully.
However, I would like to get actual URL to the directory so I need to
convert .....

DirectoryEntry entry = new DirectoryEntry(@"IIS://localhost/W3SVC/1/
Root/MyApp");

to

http://myserver/MyApp

I check all properties in DirectoryEntry but none points to actual
URL. Can you help, please?
Jan 9 '08 #1
4 1840
I don't know that you can do that, since IIS can host on multiple
adapters, each of which corresponds to different IP addresses, which
theoretically, could map to separate DNS names.

You will have to get the adapters that you want to get the URLs for, and
then do a reverse lookup on the IP address, getting the DNS name. That
should help you with constructing the full URL you are looking for. Since
you already have the application entry, you should be able to get the
virtual directory for your app, and then tack it onto the DNS name.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
<sc*********@yahoo.comwrote in message
news:73**********************************@n20g2000 hsh.googlegroups.com...
>I created virtual directory in my custom setup project successfully.
However, I would like to get actual URL to the directory so I need to
convert .....

DirectoryEntry entry = new DirectoryEntry(@"IIS://localhost/W3SVC/1/
Root/MyApp");

to

http://myserver/MyApp

I check all properties in DirectoryEntry but none points to actual
URL. Can you help, please?

Jan 9 '08 #2
I was afraid of answer like that. I'm ok with installing only on
"Default Web Site", so if I can just get the machine name then append
the virtual directory name, as in,

http://mymachine/myapp

then I should be good to go. I know little about DNS but won't it be
always the same as the machine name?

On Jan 9, 11:57*am, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
* * I don't know that you can do that, since IIS can host on multiple
adapters, each of which corresponds to different IP addresses, which
theoretically, could map to separate DNS names.

* * You will have to get the adapters that you want to get the URLs for, and
then do a reverse lookup on the IP address, getting the DNS name. *That
should help you with constructing the full URL you are looking for. *Since
you already have the application entry, you should be able to get the
virtual directory for your app, and then tack it onto the DNS name.

--
* * * * * - Nicholas Paldino [.NET/C# MVP]
* * * * * - m...@spam.guard.caspershouse.com

<scottiey...@yahoo.comwrote in message

news:73**********************************@n20g2000 hsh.googlegroups.com...
I created virtual directory in my custom setup project successfully.
However, I would like to get actual URL to the directory so I need to
convert .....
DirectoryEntry entry = new DirectoryEntry(@"IIS://localhost/W3SVC/1/
Root/MyApp");
to
http://myserver/MyApp
I check all properties in DirectoryEntry but none points to actual
URL. *Can you help, please?- Hide quoted text -

- Show quoted text -
Jan 9 '08 #3
If this is for an intranet, then yes, you can use the NETBIOS name
(machine name) and then create the URL from that. If you are talking about
external access, then you would have to do a reverse DNS lookup (or just
hard code the associations if you know them).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<sc*********@yahoo.comwrote in message
news:a5**********************************@u10g2000 prn.googlegroups.com...
I was afraid of answer like that. I'm ok with installing only on
"Default Web Site", so if I can just get the machine name then append
the virtual directory name, as in,

http://mymachine/myapp

then I should be good to go. I know little about DNS but won't it be
always the same as the machine name?

On Jan 9, 11:57 am, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
I don't know that you can do that, since IIS can host on multiple
adapters, each of which corresponds to different IP addresses, which
theoretically, could map to separate DNS names.

You will have to get the adapters that you want to get the URLs for, and
then do a reverse lookup on the IP address, getting the DNS name. That
should help you with constructing the full URL you are looking for. Since
you already have the application entry, you should be able to get the
virtual directory for your app, and then tack it onto the DNS name.

--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com

<scottiey...@yahoo.comwrote in message

news:73**********************************@n20g2000 hsh.googlegroups.com...
I created virtual directory in my custom setup project successfully.
However, I would like to get actual URL to the directory so I need to
convert .....
DirectoryEntry entry = new DirectoryEntry(@"IIS://localhost/W3SVC/1/
Root/MyApp");
to
http://myserver/MyApp
I check all properties in DirectoryEntry but none points to actual
URL. Can you help, please?- Hide quoted text -

- Show quoted text -

Jan 9 '08 #4
It is only for Intranet. I tested out the scenario and it works as
described. I'm ok with the solution. Thank you for your input.

Scott

On Jan 9, 1:41*pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
* * If this is for an intranet, then yes, you can use the NETBIOS name
(machine name) and then create the URL from that. *If you are talking about
external access, then you would have to do a reverse DNS lookup (or just
hard code the associations if you know them).

--
* * * * * - Nicholas Paldino [.NET/C# MVP]
* * * * * - m...@spam.guard.caspershouse.com

<scottiey...@yahoo.comwrote in message

news:a5**********************************@u10g2000 prn.googlegroups.com...
I was afraid of answer like that. *I'm ok with installing only on
"Default Web Site", so if I can just get the machine name then append
the virtual directory name, as in,

http://mymachine/myapp

then I should be good to go. *I know little about DNS but won't it be
always the same as the machine name?

On Jan 9, 11:57 am, "Nicholas Paldino [.NET/C# MVP]"

<m...@spam.guard.caspershouse.comwrote:
I don't know that you can do that, since IIS can host on multiple
adapters, each of which corresponds to different IP addresses, which
theoretically, could map to separate DNS names.
You will have to get the adapters that you want to get the URLs for, and
then do a reverse lookup on the IP address, getting the DNS name. That
should help you with constructing the full URL you are looking for. Since
you already have the application entry, you should be able to get the
virtual directory for your app, and then tack it onto the DNS name.
--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com
<scottiey...@yahoo.comwrote in message
news:73**********************************@n20g2000 hsh.googlegroups.com...
>I created virtual directory in my custom setup project successfully.
However, I would like to get actual URL to the directory so I need to
convert .....
DirectoryEntry entry = new DirectoryEntry(@"IIS://localhost/W3SVC/1/
Root/MyApp");
to
>http://myserver/MyApp
I check all properties in DirectoryEntry but none points to actual
URL. Can you help, please?- Hide quoted text -
- Show quoted text -- Hide quoted text -

- Show quoted text -
Jan 10 '08 #5

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

Similar topics

1
by: Rik Hoeflaak | last post by:
Hi there, I'm struggling with this problem: in a website I developed, XML files are created by users of the site to describe. The creation is OK, the (new) file is present, but it can not be...
5
by: Leszek | last post by:
Hello, Could anybody explain what's a difference between a virtual directory and an application root under IIS? I'm a little bit confused. This is mu problem: Let's assume the following...
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...
2
by: Jack Wright | last post by:
Dear All, We have just ported our applications to .net 1.1 from .net 1.0 and updated all our WebServers to .net 1.1...we are typically using IIS 5.1... We have observed that when a directory is...
4
by: mcwooq | last post by:
Hi, I just installed the VS.Studio 2005 Team Edition for Developper and encountered severe problems with debugging ASP.NET 2.0 projects. Even newly empty created ASP 2.0 projects can't debug...
18
by: Eddie Suey | last post by:
I'm creating a directory and a file in the directory. When I try to write to the file I get the following error: "Can not access the file ... because it is being used by another process". The...
2
by: CodeMonkey | last post by:
Hi all I created a web site project using Visual Studio 2005 and then created the Deployment Project to deploy it. I set the virtual directory property on the web application folder to "testsite"....
3
by: =?Utf-8?B?QkM=?= | last post by:
Hello, I just created a Hello World webservice in VB2005 (this is my first webservice ever). I ran it in debug mode and the page that came up said Hello World and said to change the webservice...
1
by: Mike Miller | last post by:
hi everybody, I am a new bee with the installing IIS virtual Directory. Presently i am trying to create a virtual directory based of a folder in a Network drive. but after i finish the setup...
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: 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
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...
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
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,...
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...
0
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...

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.