Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 18th, 2006, 10:18 AM
Authorized User
 
Join Date: Oct 2004
Location: Bangalore, Karnataka, India.
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
  #2 (permalink)  
Old January 23rd, 2006, 12:14 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
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
  #3 (permalink)  
Old January 25th, 2006, 12:17 AM
Authorized User
 
Join Date: Oct 2004
Location: Bangalore, Karnataka, India.
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 :).


  #4 (permalink)  
Old January 25th, 2006, 02:44 AM
Authorized User
 
Join Date: Oct 2004
Location: Bangalore, Karnataka, India.
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


  #5 (permalink)  
Old January 25th, 2006, 09:56 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
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
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 05:31 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.