application relative paths not working

  • Thread starter Thread starter Guest
  • Start date Start date
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!
 
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
 
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?
 
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
 
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.
 
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
 
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.
 
Ok, got it. So what is the URL of the page containing these links...and what
is the name of the vdir.

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

Back
Top