application relative paths not working

G

Guest

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!
 
J

Jeff Dillon

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
 
G

Guest

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?
 
J

Jeff Dillon

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
 
G

Guest

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.
 
J

Jeff Dillon

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
 
G

Guest

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.
 
J

Jeff Dillon

Ok, got it. So what is the URL of the page containing these links...and what
is the name of the vdir.

Jeff
 
J

Jeff Dillon

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top