Usercontrol in webforms subfolder

L

Lars Pedersen

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
 
A

Axel Dahmen

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
 
L

Lars Pedersen

I left the web.config untouched, and there are no location tags.

-Lars
"Axel Dahmen" <[email protected]> skrev i en meddelelse
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top