Click to See Complete Forum and Search --> : IIS 6.0 relative path problems
samv12
Oct 29th, 2009, 06:04 PM
hello there,
I am having an issue with iis 6.0. Here's the deal, my IT manager decided that he wants to move my web app which was working perfectly fine from one server to the other. The problem is that now there seems to be a path problem because IIS can't seem to find the dataccess.dll or the image folder so obviously it is looking in the wrong places.
lets just say that /new cfv development is the root folder
inside the login page (/new cfv development/Presentation Layer/Front-End/login.aspx) I execute the following code:
Response.Redirect("~/Presentation Layer/Front-End/Main_Page.aspx")
and i end up getting this url:
/new cfv development/Presentation Layer/Presentation Layer/Front-End/Main_Page.aspx
presentation layer is repeated twice, this is also the case when its looking for the image folder or the dataaccess etc etc. Why is it adding this unnecessary folder to the path? It was working perfectly on the other server and now this. Thanks in advance and I hope I made my self clear.
Nightwalker83
Oct 29th, 2009, 10:33 PM
Try setting the path as:
Response.Redirect("../Front-End/Main_Page.aspx")
or
Response.Redirect("/Front-End/Main_Page.aspx")
samv12
Oct 30th, 2009, 12:37 AM
Thanks for the reply. I think this might work when trying to redirect, my biggest problem however is IIS finding the referenced .dll. Not to mention everything was working fine when the website was hosted on the other server. Which makes me certain that its not an issue with the code but rather an issue with the IIS setup. Its like it thinks that presentation layer is the root folder. Maybe its something to do with it being an application vs being a virtual directory, because on the previous server i just copied the website folders to an already existing folder on the server (if that makes sense), this time it has an application pool and everything..:confused: am at loss here.
Nightwalker83
Oct 30th, 2009, 12:41 AM
Is the above url the one pointing to the *dll at the moment? What was the old path when the system was working?
samv12
Oct 30th, 2009, 01:12 AM
where do you find the path for referenced .dlls (in code)? because i typically add a reference on my local machine (using visual studio), and then then copy all the folders including the bin folder to the remote server, and that was working fine on the old server.
samv12
Oct 30th, 2009, 01:18 AM
it basically goes one level over the root directory which is a sub directory of another application. However even when i try to change the root directory i can't because its grayed out.
so lets say i have /x/y/z and x is the root directory it goes back y instead of x. and x is in itself an application inside another application, which is basically a portal.
Nightwalker83
Oct 30th, 2009, 01:21 AM
I was thinking you could find the path via explore, just browse to the directory when the file is then right click and select properties.
samv12
Oct 30th, 2009, 01:31 AM
First of all thanks a lot for replying man i really appreciate. Maybe i have to manually go and change all the paths to absolute paths then. I think there is an easier solution out there though. I think it was maybe working before they starting setting up the portal application in the root folder, and throwing my stuff in a sub folder. I think what i 'll do is probably delete the application sub folder and then redeploy all the folders as just a virtual directory.
Nightwalker83
Oct 30th, 2009, 01:39 AM
I remember experiencing the problem of repeating folders as in the first post! However, I can't remember how I resolved the problem. Hopefully, I posted the problem on here as well as the solution. I experience the problem while creating the links for a website ages ago.
Edit:
After looking through my emails from last year I found an early copy of a website I made where the links acted like what you put in your original post.
Tumbalong Soccer Club/site/html/site/html/leagues/page.html
../site/html/
I solved the problem of repeating folders by:
page.html
Thus removing "site/html/" from the url.
You will need to recheck your code to make sure all the links are pointing to the correct location.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.