Link to home
Start Free TrialLog in
Avatar of sethspearman
sethspearman

asked on

New files added to existing project in sub-folder cause "Could Not Load Type" error message.

I have an existing ASP.NET project.  

I wanted to create a new secure portion for the website.  So in my VS.NET project I created a subfolder and created new web config file with correct authorization and authentication setup.  I put new login.aspx and default.aspx into this folder.  I made the new folder an application root so it could have it's own authentication scheme.  

For testing I make default.aspx of subfolder the start page.  All that is fine.

When I try to run ANY of the files in the new subfolder I am getting the following compile 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 'MyApplication.Login'.

Source Error:


Line 1:  <%@ Page Language="vb" AutoEventWireup="false" Codebehind="Login.aspx.vb" Inherits="MyApplication.Login"%>
 
I have determined that if I move the files into the root of the web I do not get an error.  But I get this Could Not Load Type error when I put the new files into the new subfolder.  

Can someone tell me how to get ASP.NET to recognize and use my sub-folders?

Seth B Spearman
SOLUTION
Avatar of raterus
raterus
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sethspearman
sethspearman

ASKER

raterus,

Thanks for your response.  Lets start from scratch.  Let's say that I have an application that is for displaying photos (like nGallery).  And for your normal users you connect to the web root.  But I also want an ADMIN application for managing the application.  I want admin users to get to THAT application by using www.myapp.com/admin.  Of course, that folder will require authentication.  Once authenticated you can access each page.

How would you set that up in VS.NET (or any dev environment for that matter)?

Seth
ok, so the main application has no authentication, just admin pages?

I'd set up forms authentication, and just secure the "Admin" folder.  You can keep it all in the same application.
Actually,

The web root is the "PUBLIC" application that requires no authentication.
Then there should be an ADMIN folder hanging off the web root that DOES require authentication.  (example(www.myapp.com/ADMIN/default.aspx).

BTW,

It just seems silly to me that creating sub-folders in a ASP.NET application would be so hard.   Other than folders, how can I organize an application without creating a bunch of little projects if the applicaton is large.

Can you please give specifics on how to set this up?

Seth
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the help.

I removed the folder as an application.  Put the Authenication settings back into the root of the web.config (which is why I moved it in the first place) and VOILA.

Thanks for your help.  And REALLY thanks for the URL.  It is exactly what I needed.

Seth