473,322 Members | 1,352 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,322 software developers and data experts.

Usercontrol in webforms subfolder

Hi.

I had a similar question here some days ago.....anyway..
When in VS.Net adding a webform in a subfolder of the project, and adding a
UserControl to this webform.
Then after setting this webform as new startpage and debugging it, I get the
Error:

Parser Error Message: It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This error
can be caused by a virtual directory not being configured as an application
in IIS.

Source Error:

Line 36: "Passport" and "None"
Line 37: -->
Line 38: <authentication mode="Windows" />
Line 39:
Line 40: <!-- APPLICATION-LEVEL TRACE LOGGING

If I set the new subfolder as a Virtual Directory in IIS, there's another
error:
"Could not loade type 'Namespace.folder.class'"

Does anyone know what is wrong here, because the webforms in the root of the
project folder seems to run perfectly??

-Lars
Nov 17 '05 #1
2 1851
Does your web.config perhaps contain one or more <location> tags? There are some tags which may only be declared on the root level of your application.

This is a flaw in the documentation. The <authentication> tag, for example, may not be used within a <location> branch of the web.config file.

HTH,
Axel Dahmen
-------------------------------
"Lars Pedersen" <ls*@wanadoo.dk> schrieb im Newsbeitrag news:Of**************@TK2MSFTNGP12.phx.gbl...
Hi.

I had a similar question here some days ago.....anyway..
When in VS.Net adding a webform in a subfolder of the project, and adding a
UserControl to this webform.
Then after setting this webform as new startpage and debugging it, I get the
Error:

Parser Error Message: It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This error
can be caused by a virtual directory not being configured as an application
in IIS.

Source Error:

Line 36: "Passport" and "None"
Line 37: -->
Line 38: <authentication mode="Windows" />
Line 39:
Line 40: <!-- APPLICATION-LEVEL TRACE LOGGING



If I set the new subfolder as a Virtual Directory in IIS, there's another
error:
"Could not loade type 'Namespace.folder.class'"

Does anyone know what is wrong here, because the webforms in the root of the
project folder seems to run perfectly??

-Lars



Nov 17 '05 #2
I left the web.config untouched, and there are no location tags.

-Lars
"Axel Dahmen" <No****@NoOneKnows.de> skrev i en meddelelse
news:eD**************@TK2MSFTNGP12.phx.gbl...
Does your web.config perhaps contain one or more <location> tags? There are
some tags which may only be declared on the root level of your application.

This is a flaw in the documentation. The <authentication> tag, for example,
may not be used within a <location> branch of the web.config file.

HTH,
Axel Dahmen
-------------------------------
"Lars Pedersen" <ls*@wanadoo.dk> schrieb im Newsbeitrag
news:Of**************@TK2MSFTNGP12.phx.gbl...
Hi.

I had a similar question here some days ago.....anyway..
When in VS.Net adding a webform in a subfolder of the project, and adding a UserControl to this webform.
Then after setting this webform as new startpage and debugging it, I get the Error:

Parser Error Message: It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:

Line 36: "Passport" and "None"
Line 37: -->
Line 38: <authentication mode="Windows" />
Line 39:
Line 40: <!-- APPLICATION-LEVEL TRACE LOGGING

If I set the new subfolder as a Virtual Directory in IIS, there's another
error:
"Could not loade type 'Namespace.folder.class'"

Does anyone know what is wrong here, because the webforms in the root of the project folder seems to run perfectly??

-Lars

Nov 17 '05 #3

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

Similar topics

1
by: VB Programmer | last post by:
I have a custom menu usercontrol that is to go on the top of all my asp.net webforms. I was wondering, how can I use FLOW layout on a page that uses this user control? (The reason I need to do...
3
by: Kris van der Mast | last post by:
Hi, I've created a little site for my sports club. In the root folder there are pages that are viewable by every anonymous user but at a certain subfolder my administration pages should be...
1
by: Kepler | last post by:
I have a custom control that is thrown onto a UserControl that is thrown onto a WebForm. Basically, I've got a scenario where if my UserControl sets an attribute on the custom control in the ascx,...
2
by: DougS | last post by:
I'm attempting to put a RequiredFieldValidator next to a text box on a user control. There will be a dozen of these controls added dynamically. At runtime I get this error: Unable to find...
4
by: 3Cooks | last post by:
I have a windows application written in Visual Basic 6.0 that is going to be redeveloped in dotNET. We are trying to decide if we should deploy using Webforms or Winforms and I need advice from...
1
by: instruo | last post by:
Hi all, Have an issue in VS 2005 that I can't seem to sort out. I have a couple of UserContols that I would like to have in a Controls subfolder off my application root. The problem is that...
2
by: gerry | last post by:
based on MSPress's ASP.NET 2.0 Applications Advaced Topics ( Table 12-3 p.472 ), and most events should be automatically wired up when @Control AutoEventWireup="true". ie. Page_InitComplete() {}...
5
by: John Kotuby | last post by:
Hi all, My application consists of a MasterPage which is used for all WebForms. I then create UserControls to populate the content area for the different WebForms. In one complicated...
5
by: woolls01 | last post by:
I am using the following code Sub Ck() Dim strStartPath As String strStartPath = "d:\workpack\rra" ListFolder strStartPath End Sub
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.