| | |
IIS .NET2 virtual directory not working
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jun 2005
Posts: 107
Reputation:
Solved Threads: 3
I'm trying to create a virtual directory in an asp.net 2 application....and I'm about ready to explode.
My company is hosting several web sites, and I want all of the sites to be able to share a directory of commonly used files, so that I won't have to include all those files with every web site.
This is important to me to save disk space and to make updates as simple as possible.
Each web site has its own application is the IIS (IIS 6.0 on Win2K3) with the following things enabled:
Anonymous acces
Integrated Windows authentication
Local impersonation
Everything's peachy until I create a new virtual directory directly below the application top level.
The virtual directory is automatically configured as an application and shows the contents of the to-be shared folder in IIS alright, but when I run my web site .NET gives me an
"Could not find a part of the path " - Error.
The source folder for the shared virtual directory has read/write acces for the "ASP.NET Machine Account" and "Internet Guest Account".
It seems I've tried everything so any hints/solutions will be greatly appreciated. :cry:
My company is hosting several web sites, and I want all of the sites to be able to share a directory of commonly used files, so that I won't have to include all those files with every web site.
This is important to me to save disk space and to make updates as simple as possible.
Each web site has its own application is the IIS (IIS 6.0 on Win2K3) with the following things enabled:
Anonymous acces
Integrated Windows authentication
Local impersonation
Everything's peachy until I create a new virtual directory directly below the application top level.
The virtual directory is automatically configured as an application and shows the contents of the to-be shared folder in IIS alright, but when I run my web site .NET gives me an
"Could not find a part of the path " - Error.
The source folder for the shared virtual directory has read/write acces for the "ASP.NET Machine Account" and "Internet Guest Account".
It seems I've tried everything so any hints/solutions will be greatly appreciated. :cry:
Web Developer
When something seems too good to be true...it usually is
When something seems too good to be true...it usually is
just a thought, but is the shared folder dug down about ten levels in a folder with odd characters or something like that?
•
•
Join Date: Jun 2005
Posts: 107
Reputation:
Solved Threads: 3
Nope.
The folder in which I wanna apply the virtual folder is in level 2 from the web site root.
All folder names are keep "valid"; no spaces, no odd characters (ΓΈ etc). Same goes for the to-be virtual folder.
The folder in which I wanna apply the virtual folder is in level 2 from the web site root.
All folder names are keep "valid"; no spaces, no odd characters (ΓΈ etc). Same goes for the to-be virtual folder.
Last edited by madmital; Feb 8th, 2007 at 9:27 am.
Web Developer
When something seems too good to be true...it usually is
When something seems too good to be true...it usually is
Ahh I think I see whats wrong, try adding an empty folder with the same name as your virtual folder in all your site roots, its an IIS quirk in that virtual directories dont automatically show as physical directories
•
•
Join Date: Jun 2005
Posts: 107
Reputation:
Solved Threads: 3
Naaa, that doesn't do it....unfortunately.
But I just (for once) read the stack trace which says:
The two bold lines don't "match"....is that right?
The first one is the actual path of the files on the server, the second one is, well, bogus.
(It is the folder 'FCKeditor' I'm trying to add as a virtual directory.)
But I just (for once) read the stack trace which says:
[DirectoryNotFoundException: Could not find a part of the path 'D:\Sites\mital_danline_dk\http\dnmt\FCKeditor\_dnm\version.txt'.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +2014176
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +998
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) +115
System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) +85
System.IO.StreamReader..ctor(String path, Encoding encoding) +16
System.IO.File.ReadAllLines(String path, Encoding encoding) +93
System.IO.File.ReadAllLines(String path) +99
login.Page_Load(Object sender, EventArgs e) in c:\dnm\login.aspx.vb:19 System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
The two bold lines don't "match"....is that right?
The first one is the actual path of the files on the server, the second one is, well, bogus.

(It is the folder 'FCKeditor' I'm trying to add as a virtual directory.)
Web Developer
When something seems too good to be true...it usually is
When something seems too good to be true...it usually is
It looks like a real wild thing this one, I am curious though, why is the app looking for a txt file while loading the login page? Thinking out loud could it be a Forms Authentication redirect problem? When you say the second one is bogus, do you mean the path bears no realtion to where the file physically appears on the Disk? Another question what location (path string) is the application looking at to get to the text file.
Last edited by sedgey; Feb 8th, 2007 at 10:44 am.
•
•
Join Date: Jun 2005
Posts: 107
Reputation:
Solved Threads: 3
When the above error occures the app. is about to load the login-page for a CMS I've been writing.
The text file contains a copyright notice and version info.
This is the first request to files in that directory which mean the application can't see it (I guess).
And yes, I mean that "c:\dnm\login.aspx" doesn't exist. Neither the file nor the folder.
The text file contains a copyright notice and version info.
This is the first request to files in that directory which mean the application can't see it (I guess).
And yes, I mean that "c:\dnm\login.aspx" doesn't exist. Neither the file nor the folder.
Web Developer
When something seems too good to be true...it usually is
When something seems too good to be true...it usually is
![]() |
Other Threads in the ASP.NET Forum
- Previous Thread: Deleting duplicate fields
- Next Thread: how to create ms. word docs in asp.net
Views: 9490 | Replies: 23
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 3.5 ajax alltypeofvideos appliances application asp asp.net beginner box browser businesslogiclayer button c# cac checkbox class complex control countryselector dataaccesslayer database datagrid datagridview datalist deployment development dgv dialog dropdownmenu dynamic dynamically edit editing embeddingactivexcontrol feedback fileuploader fill findcontrol flash folder form gridview gudi identity iis image javascript languages list listbox maps mobile mouse mssql nameisnotdeclared news novell numerical opera parent problem profile project radio redirect registration relationaldatabases reportemail response.redirect richtextbox rows schoolproject search security select sessionvariables silverlight smoobjects software sql sql-server ssl theft tracking treeview validatedate validation vb.net videos vista visualstudio vs2008 web webapplications webdevelopment webprogramming wizard xsl






