Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 18th, 2006, 10:18 AM
Authorized User
 
Join Date: Oct 2004
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multipe Virtual Directory to point one folder

Hi,
 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
 http://www.mysite.com/mydir/mypage.aspx
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
Code:
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!
Hareesh
 
Old January 23rd, 2006, 12:14 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

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.

-Peter
 
Old January 25th, 2006, 12:17 AM
Authorized User
 
Join Date: Oct 2004
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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


 
Old January 25th, 2006, 02:44 AM
Authorized User
 
Join Date: Oct 2004
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default


http://msdn.microsoft.com/library/en...lrewriting.asp
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


 
Old January 25th, 2006, 09:56 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

ghari,

I started a new thread to continue discussion:

http://p2p.wrox.com/topic.asp?TOPIC_ID=39151

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Can not create virtual directory for Ch 16 folder cJeffreywang BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 2 February 16th, 2008 09:34 PM
Making a folder virtual folder on button click in CsharpHelp C# 0 October 26th, 2005 05:57 AM
Virtual Directory kristina BOOK: Beginning ASP 3.0 1 April 22nd, 2005 09:49 AM





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