IIS .NET2 virtual directory not working

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jun 2005
Posts: 107
Reputation: madmital is an unknown quantity at this point 
Solved Threads: 3
madmital madmital is offline Offline
Junior Poster

IIS .NET2 virtual directory not working

 
0
  #1
Feb 8th, 2007
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:
Web Developer
When something seems too good to be true...it usually is
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 130
Reputation: sedgey is on a distinguished road 
Solved Threads: 8
sedgey's Avatar
sedgey sedgey is offline Offline
Junior Poster

Re: IIS .NET2 virtual directory not working

 
0
  #2
Feb 8th, 2007
just a thought, but is the shared folder dug down about ten levels in a folder with odd characters or something like that?
David Ridgway: so little daylight, too much caffeine
MCSD MCAD MCSE
http://web2asp.net
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 107
Reputation: madmital is an unknown quantity at this point 
Solved Threads: 3
madmital madmital is offline Offline
Junior Poster

Re: IIS .NET2 virtual directory not working

 
0
  #3
Feb 8th, 2007
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.
Last edited by madmital; Feb 8th, 2007 at 9:27 am.
Web Developer
When something seems too good to be true...it usually is
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 130
Reputation: sedgey is on a distinguished road 
Solved Threads: 8
sedgey's Avatar
sedgey sedgey is offline Offline
Junior Poster

Re: IIS .NET2 virtual directory not working

 
0
  #4
Feb 8th, 2007
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
David Ridgway: so little daylight, too much caffeine
MCSD MCAD MCSE
http://web2asp.net
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 107
Reputation: madmital is an unknown quantity at this point 
Solved Threads: 3
madmital madmital is offline Offline
Junior Poster

Re: IIS .NET2 virtual directory not working

 
0
  #5
Feb 8th, 2007
Naaa, that doesn't do it....unfortunately.

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
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 130
Reputation: sedgey is on a distinguished road 
Solved Threads: 8
sedgey's Avatar
sedgey sedgey is offline Offline
Junior Poster

Re: IIS .NET2 virtual directory not working

 
0
  #6
Feb 8th, 2007
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.
David Ridgway: so little daylight, too much caffeine
MCSD MCAD MCSE
http://web2asp.net
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 107
Reputation: madmital is an unknown quantity at this point 
Solved Threads: 3
madmital madmital is offline Offline
Junior Poster

Re: IIS .NET2 virtual directory not working

 
0
  #7
Feb 8th, 2007
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.
Web Developer
When something seems too good to be true...it usually is
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,273
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 543
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: IIS .NET2 virtual directory not working

 
0
  #8
Feb 8th, 2007
had a similar problem. iis justt refused to work. Try something like Abyss Web Server X1 - it has native ASP.NET 1.1 and 2.0 support
Last edited by jbennet; Feb 8th, 2007 at 10:56 am.
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 107
Reputation: madmital is an unknown quantity at this point 
Solved Threads: 3
madmital madmital is offline Offline
Junior Poster

Re: IIS .NET2 virtual directory not working

 
0
  #9
Feb 8th, 2007
Can't migrate or make significant changes to the server setup.
I have approx. 150 web sites to support - it would be too costly.
There must be someone who has solved a similar problem...
Web Developer
When something seems too good to be true...it usually is
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 130
Reputation: sedgey is on a distinguished road 
Solved Threads: 8
sedgey's Avatar
sedgey sedgey is offline Offline
Junior Poster

Re: IIS .NET2 virtual directory not working

 
0
  #10
Feb 8th, 2007
is login.aspx set as the login page in your web.config ?
also, have you used a location section to set authentication properties for the virtual directory?
Last edited by sedgey; Feb 8th, 2007 at 11:20 am.
David Ridgway: so little daylight, too much caffeine
MCSD MCAD MCSE
http://web2asp.net
Reply With Quote Quick reply to this message  
Reply

Message:



Other Threads in the ASP.NET Forum


Views: 9490 | Replies: 23
Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC