469,630 Members | 1,207 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,630 developers. It's quick & easy.

application relative paths not working

I have a subfolder under wwwroot set up as a virtual directory with its own
application name in IIS. I pulled it down from Visual Source Safe and, on the
machine where it's normally hosted, it works fine. On my machine, though, all
the application relative paths are resolving relative to wwwroot. Can anyone
tell me what I might be doing wrong?

Thanks!
Apr 13 '06 #1
9 1621
Show your code..specifically the path mentioned. Do you have it configured
as an application/vdir on your machine too?

What the physical location on your machine?

Jeff
"Garann Means" <Garann Me***@discussions.microsoft.com> wrote in message
news:16**********************************@microsof t.com...
I have a subfolder under wwwroot set up as a virtual directory with its own
application name in IIS. I pulled it down from Visual Source Safe and, on
the
machine where it's normally hosted, it works fine. On my machine, though,
all
the application relative paths are resolving relative to wwwroot. Can
anyone
tell me what I might be doing wrong?

Thanks!

Apr 13 '06 #2
Here's a snippet of the HTML. It's all simple stuff, like CSS and images:

<td align="right" valign="bottom" width="*" class="fineText">
<div style="text-align:left;width:220px;font-size:7pt;">
<a href="http://feeds.feedburner.com/MMetricsInc"><img
src="/img/icons/feed-icon-10x10.gif" width="10" height="10" alt="XML Data
Feed" />
M:Metrics RSS Feed </a><a
href="http://feeds.feedburner.com/MMetrics/mblog"><img
src="/img/icons/feed-icon-10x10.gif" width="10" height="10" alt="XML Data
Feed"
style="margin-left:20px;" /> M:Blog RSS Feed </a>
<br />
<br />
<a href="/about/contact.aspx">Sign up</a> for M:Metrics email alerts
<br />
<br />
</div>
</td>

As I said above, it appears to be set up correctly as a virtual directory
and an application. Any other thoughts?
"Jeff Dillon" wrote:
Show your code..specifically the path mentioned. Do you have it configured
as an application/vdir on your machine too?

What the physical location on your machine?

Jeff
"Garann Means" <Garann Me***@discussions.microsoft.com> wrote in message
news:16**********************************@microsof t.com...
I have a subfolder under wwwroot set up as a virtual directory with its own
application name in IIS. I pulled it down from Visual Source Safe and, on
the
machine where it's normally hosted, it works fine. On my machine, though,
all
the application relative paths are resolving relative to wwwroot. Can
anyone
tell me what I might be doing wrong?

Thanks!


Apr 13 '06 #3
The way you have it, "/img/icons/fee" will be right off the root of
feeds.feedburner.com it appears, unliess you have MMetrics set up as a
virtual directory on your machine.

And that isn't a relative path..it's absolute. ../img etc would be relative

Jeff

"Garann Means" <Ga*********@discussions.microsoft.com> wrote in message
news:C9**********************************@microsof t.com...
Here's a snippet of the HTML. It's all simple stuff, like CSS and images:

<td align="right" valign="bottom" width="*" class="fineText">
<div style="text-align:left;width:220px;font-size:7pt;">
<a href="http://feeds.feedburner.com/MMetricsInc"><img
src="/img/icons/feed-icon-10x10.gif" width="10" height="10" alt="XML Data
Feed" />
M:Metrics RSS Feed </a><a
href="http://feeds.feedburner.com/MMetrics/mblog"><img
src="/img/icons/feed-icon-10x10.gif" width="10" height="10" alt="XML Data
Feed"
style="margin-left:20px;" /> M:Blog RSS Feed </a>
<br />
<br />
<a href="/about/contact.aspx">Sign up</a> for M:Metrics email alerts
<br />
<br />
</div>
</td>

As I said above, it appears to be set up correctly as a virtual directory
and an application. Any other thoughts?
"Jeff Dillon" wrote:
Show your code..specifically the path mentioned. Do you have it
configured
as an application/vdir on your machine too?

What the physical location on your machine?

Jeff
"Garann Means" <Garann Me***@discussions.microsoft.com> wrote in message
news:16**********************************@microsof t.com...
>I have a subfolder under wwwroot set up as a virtual directory with its
>own
> application name in IIS. I pulled it down from Visual Source Safe and,
> on
> the
> machine where it's normally hosted, it works fine. On my machine,
> though,
> all
> the application relative paths are resolving relative to wwwroot. Can
> anyone
> tell me what I might be doing wrong?
>
> Thanks!


Apr 13 '06 #4
Thanks, but the problem is that the folder IS set up as a virtual directory
and an application (as stated above, twice) and the paths are not resolving
relative to it. I am trying to figure out why.
"Jeff Dillon" wrote:
The way you have it, "/img/icons/fee" will be right off the root of
feeds.feedburner.com it appears, unliess you have MMetrics set up as a
virtual directory on your machine.

And that isn't a relative path..it's absolute. ../img etc would be relative

Jeff

"Garann Means" <Ga*********@discussions.microsoft.com> wrote in message
news:C9**********************************@microsof t.com...
Here's a snippet of the HTML. It's all simple stuff, like CSS and images:

<td align="right" valign="bottom" width="*" class="fineText">
<div style="text-align:left;width:220px;font-size:7pt;">
<a href="http://feeds.feedburner.com/MMetricsInc"><img
src="/img/icons/feed-icon-10x10.gif" width="10" height="10" alt="XML Data
Feed" />
M:Metrics RSS Feed </a><a
href="http://feeds.feedburner.com/MMetrics/mblog"><img
src="/img/icons/feed-icon-10x10.gif" width="10" height="10" alt="XML Data
Feed"
style="margin-left:20px;" /> M:Blog RSS Feed </a>
<br />
<br />
<a href="/about/contact.aspx">Sign up</a> for M:Metrics email alerts
<br />
<br />
</div>
</td>

As I said above, it appears to be set up correctly as a virtual directory
and an application. Any other thoughts?
"Jeff Dillon" wrote:
Show your code..specifically the path mentioned. Do you have it
configured
as an application/vdir on your machine too?

What the physical location on your machine?

Jeff
"Garann Means" <Garann Me***@discussions.microsoft.com> wrote in message
news:16**********************************@microsof t.com...
>I have a subfolder under wwwroot set up as a virtual directory with its
>own
> application name in IIS. I pulled it down from Visual Source Safe and,
> on
> the
> machine where it's normally hosted, it works fine. On my machine,
> though,
> all
> the application relative paths are resolving relative to wwwroot. Can
> anyone
> tell me what I might be doing wrong?
>
> Thanks!


Apr 13 '06 #5
You have two different vdirs mentioned then: MMetricsInc and MMetrics

Which one is it? Which is the virtual name? If it's MMetrics..then /img for
MMetricsInc will INDEED be against the server webroot.

Jeff

"Garann Means" <Ga*********@discussions.microsoft.com> wrote in message
news:44**********************************@microsof t.com...
Thanks, but the problem is that the folder IS set up as a virtual
directory
and an application (as stated above, twice) and the paths are not
resolving
relative to it. I am trying to figure out why.
"Jeff Dillon" wrote:
The way you have it, "/img/icons/fee" will be right off the root of
feeds.feedburner.com it appears, unliess you have MMetrics set up as a
virtual directory on your machine.

And that isn't a relative path..it's absolute. ../img etc would be
relative

Jeff

"Garann Means" <Ga*********@discussions.microsoft.com> wrote in message
news:C9**********************************@microsof t.com...
> Here's a snippet of the HTML. It's all simple stuff, like CSS and
> images:
>
> <td align="right" valign="bottom" width="*" class="fineText">
> <div style="text-align:left;width:220px;font-size:7pt;">
> <a href="http://feeds.feedburner.com/MMetricsInc"><img
> src="/img/icons/feed-icon-10x10.gif" width="10" height="10" alt="XML
> Data
> Feed" />
> M:Metrics RSS Feed </a><a
> href="http://feeds.feedburner.com/MMetrics/mblog"><img
> src="/img/icons/feed-icon-10x10.gif" width="10" height="10" alt="XML
> Data
> Feed"
> style="margin-left:20px;" /> M:Blog RSS Feed </a>
> <br />
> <br />
> <a href="/about/contact.aspx">Sign up</a> for M:Metrics email alerts
> <br />
> <br />
> </div>
> </td>
>
> As I said above, it appears to be set up correctly as a virtual
> directory
> and an application. Any other thoughts?
>
>
> "Jeff Dillon" wrote:
>
>> Show your code..specifically the path mentioned. Do you have it
>> configured
>> as an application/vdir on your machine too?
>>
>> What the physical location on your machine?
>>
>> Jeff
>> "Garann Means" <Garann Me***@discussions.microsoft.com> wrote in
>> message
>> news:16**********************************@microsof t.com...
>> >I have a subfolder under wwwroot set up as a virtual directory with
>> >its
>> >own
>> > application name in IIS. I pulled it down from Visual Source Safe
>> > and,
>> > on
>> > the
>> > machine where it's normally hosted, it works fine. On my machine,
>> > though,
>> > all
>> > the application relative paths are resolving relative to wwwroot.
>> > Can
>> > anyone
>> > tell me what I might be doing wrong?
>> >
>> > Thanks!
>>
>>
>>


Apr 13 '06 #6
It's neither of those. Those are two directories on a different machine. This
file and the img directory and all the other resources being referred to with
relative paths are within one virtual directory directly under wwwroot.

"Jeff Dillon" wrote:
You have two different vdirs mentioned then: MMetricsInc and MMetrics

Which one is it? Which is the virtual name? If it's MMetrics..then /img for
MMetricsInc will INDEED be against the server webroot.

Jeff


Apr 13 '06 #7
Ok, got it. So what is the URL of the page containing these links...and what
is the name of the vdir.

Jeff

"Garann Means" <Ga*********@discussions.microsoft.com> wrote in message
news:7C**********************************@microsof t.com...
It's neither of those. Those are two directories on a different machine.
This
file and the img directory and all the other resources being referred to
with
relative paths are within one virtual directory directly under wwwroot.

"Jeff Dillon" wrote:
You have two different vdirs mentioned then: MMetricsInc and MMetrics

Which one is it? Which is the virtual name? If it's MMetrics..then /img
for
MMetricsInc will INDEED be against the server webroot.

Jeff

Apr 13 '06 #8
The page isn't public. But the URL is like this: http://localhost/myApp with
"myApp" being the name of the virtual directory. The file's physical path
would be c:\inetpub\wwwroot\myApp.

"Jeff Dillon" wrote:
Ok, got it. So what is the URL of the page containing these links...and what
is the name of the vdir.

Jeff

"Garann Means" <Ga*********@discussions.microsoft.com> wrote in message
news:7C**********************************@microsof t.com...
It's neither of those. Those are two directories on a different machine.
This
file and the img directory and all the other resources being referred to
with
relative paths are within one virtual directory directly under wwwroot.

"Jeff Dillon" wrote:
You have two different vdirs mentioned then: MMetricsInc and MMetrics

Which one is it? Which is the virtual name? If it's MMetrics..then /img
for
MMetricsInc will INDEED be against the server webroot.

Jeff


Apr 14 '06 #9
So the links are trying to access c:\inetpub\wwwroot\inc and not
c:\inetpub\wwwroot\myApp\inc?

Weird. Sorry I can't be more help

Try putting in a Response.Write Server.MapPath() and see what you get.

Jeff
"Garann Means" <Ga*********@discussions.microsoft.com> wrote in message
news:41**********************************@microsof t.com...
The page isn't public. But the URL is like this: http://localhost/myApp
with
"myApp" being the name of the virtual directory. The file's physical path
would be c:\inetpub\wwwroot\myApp.

"Jeff Dillon" wrote:
Ok, got it. So what is the URL of the page containing these links...and
what
is the name of the vdir.

Jeff

"Garann Means" <Ga*********@discussions.microsoft.com> wrote in message
news:7C**********************************@microsof t.com...
> It's neither of those. Those are two directories on a different
> machine.
> This
> file and the img directory and all the other resources being referred
> to
> with
> relative paths are within one virtual directory directly under wwwroot.
>
>
>
> "Jeff Dillon" wrote:
>
>> You have two different vdirs mentioned then: MMetricsInc and MMetrics
>>
>> Which one is it? Which is the virtual name? If it's MMetrics..then
>> /img
>> for
>> MMetricsInc will INDEED be against the server webroot.
>>
>> Jeff
>


Apr 17 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Doug | last post: by
2 posts views Thread by Jason Moore | last post: by
2 posts views Thread by Joe | last post: by
3 posts views Thread by Dave | last post: by
5 posts views Thread by =?Utf-8?B?TWlrZQ==?= | last post: by
15 posts views Thread by Lars Eighner | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.