Accessing pages in a project sub-folder

  • Thread starter Thread starter John G.
  • Start date Start date
J

John G.

I am getting the following error when attempting to browse a page,
"WebForm1.aspx", in a web forms project sub-folder,
"/FormsAuth1/Protected/".

Parser Error Message: Could not load type 'FormsAuth1.WebForm1'
Line 1: <%@ Page Codebehind="WebForm1.aspx.vb"
Inherits="FormsAuth1.WebForm1"%>

The IIS virtual folder "/Default Web Site/FormsAuth1/Protected" is
configured as an application. I'm calling the page directly in IE by typing
"http://localhost/FormsAuth1/Protected/Webform1.aspx" in the address box.
The goal is to apply Forms Authentication to the pages in the folder
"Protected". What's the right way to build & access .aspx pages in a
sub-folder?

Using Windows 2000 Pro / VS.NET V1.0 / Framework 1.0.3705 / IIS 5.0 / IE
6.0.

Thanks.
 
This looks like you haven't compiled your project yet.

Compile the project and retry.



----- John G. wrote: -----

I am getting the following error when attempting to browse a page,
"WebForm1.aspx", in a web forms project sub-folder,
"/FormsAuth1/Protected/".

Parser Error Message: Could not load type 'FormsAuth1.WebForm1'
Line 1: <%@ Page Codebehind="WebForm1.aspx.vb"
Inherits="FormsAuth1.WebForm1"%>

The IIS virtual folder "/Default Web Site/FormsAuth1/Protected" is
configured as an application. I'm calling the page directly in IE by typing
"http://localhost/FormsAuth1/Protected/Webform1.aspx" in the address box.
The goal is to apply Forms Authentication to the pages in the folder
"Protected". What's the right way to build & access .aspx pages in a
sub-folder?

Using Windows 2000 Pro / VS.NET V1.0 / Framework 1.0.3705 / IIS 5.0 / IE
6.0.

Thanks.
 
This is a web project. I have built & rebuilt both solution and project.
By "compile", are you referring to something else?
 
Yes I meant building the project

So that doesn't seem to be the problem then

What's the namespace of the codebehind class for WebForm1.aspx?
 
Thanks for your time. I'm not quite sure how to answer that question. The
code-behind class, "WebForm1.aspx.vb", inherits from System.Web.UI.Page.
"WebForm1.aspx" has a directive that includes <%@ Page
Codebehind="WebForm1.aspx.vb" Inherits="FormsAuth1.WebForm1"%>. The error
seems to indicate a failure of the .aspx file to inherit the code-behind
class. The problem seems to stem from the fact that this page is in a
project sub-folder. If I move it up to the project root level, the page
browses without problem.
 
Back
Top