473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 4251
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.