could not find a part of the path error-VS2K5

could not find a part of the path error-VS2K5

Post by EPPac » Fri, 25 Jul 2008 02:31:15

VS2005 on XP Pro SP3. " runtime error: could not find a part of
the path" is the full message on this code line:

<%@ Page Language="vb" AutoEventWireup="false"
CodeFile="default.aspx.vb" code Inherits="WebProjectName._default"

Relatively new to VS, we set up a solution on my machine that was
working fine, and for various reasons, decided to create a brand new
one in a different folder, then added the older projects to the new
one. That all seemed to work OK, but now I'm getting the above error,
and the second part it shows is the old folder name. I've looked thru
the files a gazillion times now, but cannot find any references at all
to that older folder path. The odd thing is that it still builds and
works fine. I set up a new virtual folder for the new actual folder,
hopefully correctly, but still get that error.

Anything else I can provide to help diagnose this? It appears to be a
fairly common error, but I can't find a lot of info on it, darn it.
Most of what I've found is several years old and on


c *** tesville, va

could not find a part of the path error-VS2K5

Post by UHVuZWV0IF » Thu, 28 Aug 2008 01:26:08

I have found out the cause of this error, but I am not sure this will help you.
Basically I created a copy of existing project in another directory. When I
open the new project and try to look at any .aspx page I got an error:
ASP.NET Runtime Error: Could not fina a part of path.
IF this is the case then do the following:
1. Open up the IIS administrator.
2. Right click on the project listed in Web Site tree.
3. Right click and select properties option from the popup menu.
4. In the virtual directory tab, change the Local path to point to the new
project base directory.
5. Close down everything and restart windows.

(I tried to start and stop the web site instead of restarting, this did not
work for me)