ASP.NET site, wants to run in subfolder not root!

Soldato
Joined
18 Oct 2002
Posts
5,661
Location
Ledbury
I have some problems... With my ASP.NET 2 site it appears to think the root is up one more level that it really is! This of course means i have a lot of issues with the application working correctly. Does anyone have any ideas on this one? I assume it must be very simple :)

Thanks
 
Mr^B said:
Note that this will ONLY work for runat="server" controls.

Yeah i know about that, but i don't want to do that at all. I want to be able to work normally!

I think this must be an IIS issue not a .net one? but i could be wrong :)
 
Webserver:
c:\inetpub\wwwroot\Test\Website
http://computer/Test

Dev machine:
c:\projects\Test\Website

On the dev machine all is fine... on the webserver it just won't work :(

If i change the webserver to:
c:\inetpub\wwwroot\Test
http://computer/Test
It makes no difference at all!


images are in /images.

I can get to them if i do: /Test/images/image.gif
but not: /images/image.gif
 
Last edited:
I should be able to use /images/test.gif, that's how it's always worked in the past, and that's how it is at work! / should take me to the root of the website, not the webserver. It all works fine through VS.net with the built in external tools web server...
 
Mr^B said:
A / reference in a url will ALWAYS go to the root of the webserver (unless you intercept and redirect the request of course).

I have no idea how you managed to achieve this using the built-in web server, all I can think of is that you were using ~/ references instead of /.

Er, aren't relative paths from the website root... This is how it's worked with every site i've ever produced! I'm just confused by what .NET is doing with my site!
 
Ok, clearly my intelligence has been lacking here :D You are all correct, i'm am wrong! (again!). I'll look into it again tonight if i can, and should be able to sort it i hope.
 
Back
Top Bottom