p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 1.0 and 1.1 Professional (http://p2p.wrox.com/forumdisplay.php?f=57)
-   -   Multipe Virtual Directory to point one folder (http://p2p.wrox.com/showthread.php?t=37346)

ghari January 18th, 2006 10:18 AM

Multipe Virtual Directory to point one folder
 I have a strange issue to talk about :D

 In my current application I have a section where each user registration will be provided a saperate Virtual Directory to browse on.
 i.e If I'm registering to the site I will have an option to specify a directory name (say 'mydir') and afterwards if someone visits my section of site will view the pages as
I do this by creating the virtual directory on the fly. This will help me pointing to the same directory and hence could use the same set of code for all the users.
 Till now I have managed to create the Virtual directory on the fly.

 My problem here is that I'm unable to browse the site providing the virtual directory name on the URL.
 It is showign the error

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'MySite.Users.home'.

 I believe it is some thing like not associating the Virtual directoy with the application.
 But I could see in ISS that the virtual directory is created well inside my primay virtual directory/ Site.

 Please let me know if I need to provide any further infomation on this.

 Any help will be highly appreciated!

Thanks in Advance!

planoie January 23rd, 2006 12:14 PM

The execution of a ASP.NET page happens within the context of 1 virtual directory application. Any page that lives within that directory will be in that context (this includes root pages and pages in any sub directory). When you page executes .NET looks for an assembly that contains the page class that the page inherits. The normal location for that assembly is the virtual ddirectory's bin\ folder.

You create another virtual directory and place a new .ASPX file in it. When that page executes it does so in a different application context. Therefore, ASP.NET tells you it can't find the class because it is looking for assemblies in the bin\ folder for the current application context which doesn't exist. So you'd need to copy all the binaries from the bin\ folder into a new bin\ folder that falls at the root of your new virtual directory.


ghari January 25th, 2006 12:17 AM

Thanks for your reply.
I have already shifted to an alternate solution.
Will post my solution here in a short while :).

ghari January 25th, 2006 02:44 AM

This link really helped me to solve my current problem.
I tried implementing URL Rewriting and amazingly it did more than what I really require.
Can this be a place where we can talk a little bit on the refered link.
I like to hear from some of the experts over there on this subject

planoie January 25th, 2006 09:56 AM


I started a new thread to continue discussion:



All times are GMT -4. The time now is 04:14 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.