944,192 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 12135
  • ASP.NET RSS
You are currently viewing page 1 of this multi-page discussion thread
Feb 8th, 2007
0

IIS .NET2 virtual directory not working

Expand Post »
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:
Reputation Points: 10
Solved Threads: 5
Junior Poster
madmital is offline Offline
119 posts
since Jun 2005
Feb 8th, 2007
0

Re: IIS .NET2 virtual directory not working

just a thought, but is the shared folder dug down about ten levels in a folder with odd characters or something like that?
Reputation Points: 68
Solved Threads: 9
Junior Poster
sedgey is offline Offline
130 posts
since Jan 2007
Feb 8th, 2007
0

Re: IIS .NET2 virtual directory not working

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.
Reputation Points: 10
Solved Threads: 5
Junior Poster
madmital is offline Offline
119 posts
since Jun 2005
Feb 8th, 2007
0

Re: IIS .NET2 virtual directory not working

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
Reputation Points: 68
Solved Threads: 9
Junior Poster
sedgey is offline Offline
130 posts
since Jan 2007
Feb 8th, 2007
0

Re: IIS .NET2 virtual directory not working

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.)
Reputation Points: 10
Solved Threads: 5
Junior Poster
madmital is offline Offline
119 posts
since Jun 2005
Feb 8th, 2007
0

Re: IIS .NET2 virtual directory not working

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.
Reputation Points: 68
Solved Threads: 9
Junior Poster
sedgey is offline Offline
130 posts
since Jan 2007
Feb 8th, 2007
0

Re: IIS .NET2 virtual directory not working

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.
Reputation Points: 10
Solved Threads: 5
Junior Poster
madmital is offline Offline
119 posts
since Jun 2005
Feb 8th, 2007
0

Re: IIS .NET2 virtual directory not working

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.
Moderator
Featured Poster
Reputation Points: 1800
Solved Threads: 575
Moderator
jbennet is offline Offline
16,534 posts
since Apr 2005
Feb 8th, 2007
0

Re: IIS .NET2 virtual directory not working

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...
Reputation Points: 10
Solved Threads: 5
Junior Poster
madmital is offline Offline
119 posts
since Jun 2005
Feb 8th, 2007
0

Re: IIS .NET2 virtual directory not working

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.
Reputation Points: 68
Solved Threads: 9
Junior Poster
sedgey is offline Offline
130 posts
since Jan 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Deleting duplicate fields
Next Thread in ASP.NET Forum Timeline: how to create ms. word docs in asp.net





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC