473,461 Members | 1,514 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Parser Error - Could not load type

Hi peeps

Ok, I've got a web application running (lets call it MyApp, so its namespace
is MyApp). I've created a subdirectory within this application called
"secure", and made than an Application in IIS too. Plus I've added another
web.config in there.

Then I added an aspx page (called UpdateLogin.aspx), which created itself in
the namespace "MyApp.secure", but when I try to load this page im getting...

"Parser Error Message: Could not load type 'MyApp.secure.UpdateLogin'."

Here's the line it's failing on...

<%@ Page language="c#" Codebehind="UpdateLogin.aspx.cs"
AutoEventWireup="false" Inherits="MyApp.secure.UpdateLogin" %>

All files are there, have tried taking out ".secure" from the namespace and
the reference, have tried adding the directory to the Codebehind option, but
all to no avail.

What's going on?

Cheers
Dan
Nov 19 '05 #1
6 4256
Hey Dan:

You probably do not want the secure subdirectory to be an application.
..NET will assume it has it's own bin directory and is looking for a
dll in secure\bin to find the code for the aspx file.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Wed, 2 Feb 2005 07:45:07 -0800, dhnriverside <da*@musoswire.com>
wrote:
Hi peeps

Ok, I've got a web application running (lets call it MyApp, so its namespace
is MyApp). I've created a subdirectory within this application called
"secure", and made than an Application in IIS too. Plus I've added another
web.config in there.

Then I added an aspx page (called UpdateLogin.aspx), which created itself in
the namespace "MyApp.secure", but when I try to load this page im getting...

"Parser Error Message: Could not load type 'MyApp.secure.UpdateLogin'."

Here's the line it's failing on...

<%@ Page language="c#" Codebehind="UpdateLogin.aspx.cs"
AutoEventWireup="false" Inherits="MyApp.secure.UpdateLogin" %>

All files are there, have tried taking out ".secure" from the namespace and
the reference, have tried adding the directory to the Codebehind option, but
all to no avail.

What's going on?

Cheers
Dan


Nov 19 '05 #2
Ok, thats cool. But the web.config file (code below) said it needed to be an
application, hence. This web.config overwrites parts of the web.config in the
main app directory.

I can I get round it wanting to be an application?

Cheers
Dan

\secure\web.config...

<configuration>
<system.web>
<authentication mode="Forms">
<forms
name="ADupdateAuth"
path="/"
loginUrl="UpdateLogin.aspx"
protection="All"
timeout="30"
/>
</authentication>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</configuration>


"Scott Allen" wrote:
Hey Dan:

You probably do not want the secure subdirectory to be an application.
..NET will assume it has it's own bin directory and is looking for a
dll in secure\bin to find the code for the aspx file.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Wed, 2 Feb 2005 07:45:07 -0800, dhnriverside <da*@musoswire.com>
wrote:
Hi peeps

Ok, I've got a web application running (lets call it MyApp, so its namespace
is MyApp). I've created a subdirectory within this application called
"secure", and made than an Application in IIS too. Plus I've added another
web.config in there.

Then I added an aspx page (called UpdateLogin.aspx), which created itself in
the namespace "MyApp.secure", but when I try to load this page im getting...

"Parser Error Message: Could not load type 'MyApp.secure.UpdateLogin'."

Here's the line it's failing on...

<%@ Page language="c#" Codebehind="UpdateLogin.aspx.cs"
AutoEventWireup="false" Inherits="MyApp.secure.UpdateLogin" %>

All files are there, have tried taking out ".secure" from the namespace and
the reference, have tried adding the directory to the Codebehind option, but
all to no avail.

What's going on?

Cheers
Dan


Nov 19 '05 #3
Does the main web site use a different authentication mechanism, like
Windows authentication?

If not, you can specify the specific sub directories to protect using
the inside a <location> element.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Wed, 2 Feb 2005 08:47:05 -0800, dhnriverside <da*@musoswire.com>
wrote:
Ok, thats cool. But the web.config file (code below) said it needed to be an
application, hence. This web.config overwrites parts of the web.config in the
main app directory.

I can I get round it wanting to be an application?

Cheers
Dan

\secure\web.config...

<configuration>
<system.web>
<authentication mode="Forms">
<forms
name="ADupdateAuth"
path="/"
loginUrl="UpdateLogin.aspx"
protection="All"
timeout="30"
/>
</authentication>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</configuration>


"Scott Allen" wrote:
Hey Dan:

You probably do not want the secure subdirectory to be an application.
..NET will assume it has it's own bin directory and is looking for a
dll in secure\bin to find the code for the aspx file.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Wed, 2 Feb 2005 07:45:07 -0800, dhnriverside <da*@musoswire.com>
wrote:
>Hi peeps
>
>Ok, I've got a web application running (lets call it MyApp, so its namespace
>is MyApp). I've created a subdirectory within this application called
>"secure", and made than an Application in IIS too. Plus I've added another
>web.config in there.
>
>Then I added an aspx page (called UpdateLogin.aspx), which created itself in
>the namespace "MyApp.secure", but when I try to load this page im getting...
>
>"Parser Error Message: Could not load type 'MyApp.secure.UpdateLogin'."
>
>Here's the line it's failing on...
>
><%@ Page language="c#" Codebehind="UpdateLogin.aspx.cs"
>AutoEventWireup="false" Inherits="MyApp.secure.UpdateLogin" %>
>
>All files are there, have tried taking out ".secure" from the namespace and
>the reference, have tried adding the directory to the Codebehind option, but
>all to no avail.
>
>What's going on?
>
>Cheers
>
>
>Dan



Nov 19 '05 #4
Yes it does. The main system using Windows Authentication. I'm try to create
a system to allow the user to update his/her Active Directory info (address,
tel, etc), but obviously I want them to login proper for that (security!).
Hence the directory, web app and web.config file.

Is there any way to make it work though? :)

"Scott Allen" wrote:
Does the main web site use a different authentication mechanism, like
Windows authentication?

If not, you can specify the specific sub directories to protect using
the inside a <location> element.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Wed, 2 Feb 2005 08:47:05 -0800, dhnriverside <da*@musoswire.com>
wrote:
Ok, thats cool. But the web.config file (code below) said it needed to be an
application, hence. This web.config overwrites parts of the web.config in the
main app directory.

I can I get round it wanting to be an application?

Cheers
Dan

\secure\web.config...

<configuration>
<system.web>
<authentication mode="Forms">
<forms
name="ADupdateAuth"
path="/"
loginUrl="UpdateLogin.aspx"
protection="All"
timeout="30"
/>
</authentication>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</configuration>


"Scott Allen" wrote:
Hey Dan:

You probably do not want the secure subdirectory to be an application.
..NET will assume it has it's own bin directory and is looking for a
dll in secure\bin to find the code for the aspx file.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Wed, 2 Feb 2005 07:45:07 -0800, dhnriverside <da*@musoswire.com>
wrote:

>Hi peeps
>
>Ok, I've got a web application running (lets call it MyApp, so its namespace
>is MyApp). I've created a subdirectory within this application called
>"secure", and made than an Application in IIS too. Plus I've added another
>web.config in there.
>
>Then I added an aspx page (called UpdateLogin.aspx), which created itself in
>the namespace "MyApp.secure", but when I try to load this page im getting...
>
>"Parser Error Message: Could not load type 'MyApp.secure.UpdateLogin'."
>
>Here's the line it's failing on...
>
><%@ Page language="c#" Codebehind="UpdateLogin.aspx.cs"
>AutoEventWireup="false" Inherits="MyApp.secure.UpdateLogin" %>
>
>All files are there, have tried taking out ".secure" from the namespace and
>the reference, have tried adding the directory to the Codebehind option, but
>all to no avail.
>
>What's going on?
>
>Cheers
>
>
>Dan


Nov 19 '05 #5
Well, you could just force them to login with thier windows account
using windows authentication. In that case you wouldn't need an
<authentication> element in the sub directory, but just an
<authorization> element to keep out anonymous users and only allow in
authenticated users. Know what I mean?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Wed, 2 Feb 2005 10:33:01 -0800, dhnriverside <da*@musoswire.com>
wrote:
Yes it does. The main system using Windows Authentication. I'm try to create
a system to allow the user to update his/her Active Directory info (address,
tel, etc), but obviously I want them to login proper for that (security!).
Hence the directory, web app and web.config file.

Is there any way to make it work though? :)

"Scott Allen" wrote:
Does the main web site use a different authentication mechanism, like
Windows authentication?

If not, you can specify the specific sub directories to protect using
the inside a <location> element.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Wed, 2 Feb 2005 08:47:05 -0800, dhnriverside <da*@musoswire.com>
wrote:
>Ok, thats cool. But the web.config file (code below) said it needed to be an
>application, hence. This web.config overwrites parts of the web.config in the
>main app directory.
>
>I can I get round it wanting to be an application?
>
>Cheers
>
>
>Dan
>
>\secure\web.config...
>
><configuration>
> <system.web>
> <authentication mode="Forms">
> <forms
> name="ADupdateAuth"
> path="/"
> loginUrl="UpdateLogin.aspx"
> protection="All"
> timeout="30"
> />
> </authentication>
> <authorization>
> <deny users="?" />
> </authorization>
> </system.web>
></configuration>
>
>
>
>
>"Scott Allen" wrote:
>
>> Hey Dan:
>>
>> You probably do not want the secure subdirectory to be an application.
>> ..NET will assume it has it's own bin directory and is looking for a
>> dll in secure\bin to find the code for the aspx file.
>>
>> --
>> Scott
>> http://www.OdeToCode.com/blogs/scott/
>>
>> On Wed, 2 Feb 2005 07:45:07 -0800, dhnriverside <da*@musoswire.com>
>> wrote:
>>
>> >Hi peeps
>> >
>> >Ok, I've got a web application running (lets call it MyApp, so its namespace
>> >is MyApp). I've created a subdirectory within this application called
>> >"secure", and made than an Application in IIS too. Plus I've added another
>> >web.config in there.
>> >
>> >Then I added an aspx page (called UpdateLogin.aspx), which created itself in
>> >the namespace "MyApp.secure", but when I try to load this page im getting...
>> >
>> >"Parser Error Message: Could not load type 'MyApp.secure.UpdateLogin'."
>> >
>> >Here's the line it's failing on...
>> >
>> ><%@ Page language="c#" Codebehind="UpdateLogin.aspx.cs"
>> >AutoEventWireup="false" Inherits="MyApp.secure.UpdateLogin" %>
>> >
>> >All files are there, have tried taking out ".secure" from the namespace and
>> >the reference, have tried adding the directory to the Codebehind option, but
>> >all to no avail.
>> >
>> >What's going on?
>> >
>> >Cheers
>> >
>> >
>> >Dan
>>
>>



Nov 19 '05 #6
Hmm... they've just logged into Windows and the Intranet app comes up, so we
wnted to avoid having to enter their password again.

So I've got the main app set to Deny unknown users, and use IWA/Windows
Auth. That means they don't have to login for the main app.

That's not really the problem is it. The problem is I cannot create an aspx
within that directory. I put one in there that I created and then moved into
the dir, and that works fine. So there must be a way of adding a file to a
directory and making it work.

"Scott Allen" wrote:
Well, you could just force them to login with thier windows account
using windows authentication. In that case you wouldn't need an
<authentication> element in the sub directory, but just an
<authorization> element to keep out anonymous users and only allow in
authenticated users. Know what I mean?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Wed, 2 Feb 2005 10:33:01 -0800, dhnriverside <da*@musoswire.com>
wrote:
Yes it does. The main system using Windows Authentication. I'm try to create
a system to allow the user to update his/her Active Directory info (address,
tel, etc), but obviously I want them to login proper for that (security!).
Hence the directory, web app and web.config file.

Is there any way to make it work though? :)

"Scott Allen" wrote:
Does the main web site use a different authentication mechanism, like
Windows authentication?

If not, you can specify the specific sub directories to protect using
the inside a <location> element.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Wed, 2 Feb 2005 08:47:05 -0800, dhnriverside <da*@musoswire.com>
wrote:

>Ok, thats cool. But the web.config file (code below) said it needed to be an
>application, hence. This web.config overwrites parts of the web.config in the
>main app directory.
>
>I can I get round it wanting to be an application?
>
>Cheers
>
>
>Dan
>
>\secure\web.config...
>
><configuration>
> <system.web>
> <authentication mode="Forms">
> <forms
> name="ADupdateAuth"
> path="/"
> loginUrl="UpdateLogin.aspx"
> protection="All"
> timeout="30"
> />
> </authentication>
> <authorization>
> <deny users="?" />
> </authorization>
> </system.web>
></configuration>
>
>
>
>
>"Scott Allen" wrote:
>
>> Hey Dan:
>>
>> You probably do not want the secure subdirectory to be an application.
>> ..NET will assume it has it's own bin directory and is looking for a
>> dll in secure\bin to find the code for the aspx file.
>>
>> --
>> Scott
>> http://www.OdeToCode.com/blogs/scott/
>>
>> On Wed, 2 Feb 2005 07:45:07 -0800, dhnriverside <da*@musoswire.com>
>> wrote:
>>
>> >Hi peeps
>> >
>> >Ok, I've got a web application running (lets call it MyApp, so its namespace
>> >is MyApp). I've created a subdirectory within this application called
>> >"secure", and made than an Application in IIS too. Plus I've added another
>> >web.config in there.
>> >
>> >Then I added an aspx page (called UpdateLogin.aspx), which created itself in
>> >the namespace "MyApp.secure", but when I try to load this page im getting...
>> >
>> >"Parser Error Message: Could not load type 'MyApp.secure.UpdateLogin'."
>> >
>> >Here's the line it's failing on...
>> >
>> ><%@ Page language="c#" Codebehind="UpdateLogin.aspx.cs"
>> >AutoEventWireup="false" Inherits="MyApp.secure.UpdateLogin" %>
>> >
>> >All files are there, have tried taking out ".secure" from the namespace and
>> >the reference, have tried adding the directory to the Codebehind option, but
>> >all to no avail.
>> >
>> >What's going on?
>> >
>> >Cheers
>> >
>> >
>> >Dan
>>
>>


Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tyson Zwicker | last post by:
Hi, I'm suddenly unable to run any ASP.net applications. Last week everything worked. But now (Mondays!) I get the same error from _every_ application I've written: Parser Error ...
2
by: ST | last post by:
Hi, I keep getting the parser error, and I have no idea why. I've tried a number of things including: 1)building/rebuilding about 100x 2)making sure all dll's are in the bin folder in the root...
2
by: BW | last post by:
When entering web site I get the following error in the Default.aspx page: Server Error in '/' Application. ---------------------------------------------------------------------------- ---- ...
2
by: Jerry Tovar | last post by:
I am using .Net 2003 on a XP Pro using IIS. My IIS is configured to have it's root on our Network drive. I have been able to create ASP.Net webform up until now. For what ever reason, I am...
2
by: mp | last post by:
I have aspx file VS.NET 2002 with c# My application works perfectly on my pc. Please, I need help... THANKS :) ============================= 1) I would like to know what is minimum files what I...
6
by: ST | last post by:
Hi, I keep getting the parser error, and I have no idea why. I've tried a number of things including: 1)building/rebuilding about 100x 2)making sure all dll's are in the bin folder in the root...
5
by: Kenneth P | last post by:
Hi, I get a Parser Error message when I try to start my asp.net app. Parser Error Message: Could not load type 'DiskoWeb.dLogin'. I have a code behind file and it's class name is dLogin. ...
1
by: Vijay | last post by:
I have an asp.net application. I am able to combile the application in vs.net but when i run/browse the application i am getting the following error. Parser Error Description: An error occurred...
2
by: Marshall | last post by:
Hi All, I am building an asp.net web app using Visual Studio 2003. Today I created a new folder called 'Secured' at the root of my web app so I could partition off all of the restricted...
28
by: Marc Gravell | last post by:
In Linq, you can apparently get a meaningful body from and expression's .ToString(); random question - does anybody know if linq also includes a parser? It just seemed it might be a handy way to...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.