Can't Run

M

Mark Oliver

Hi, When i try to run without debugging from the ide i get :

Server Error in '/' Application.
--------------------------------------------------------------------------------

Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.

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 44: by Microsoft that offers a single logon and core profile
services for member sites.
Line 45: -->
Line 46: <authentication mode="windows" />
Line 47:
Line 48: <!-- AUTHORIZATION


What do i do to fix this problem?

Thanks,
Mark
 
K

Karl Seguin

Mark,
There are a number of places where configuration settings can be placed.
machine.config, web.config, @Page and @Control directives. Some
configuration settings aren't valid in all places. For example, you can put
a memoryLimit setting in the @Control directive, only in the
machine.config's processModel section. This error is telling you that you
have a configuration setting somewhere it doesn't belong. From the looks of
it, I'd say you are trying to set the authentication setting in a web.config
file which isn't at the root of the application - this is not allowed.

The two possibilities are (a) this is a mistake and the web.config IS at the
root of the application. If this is the case, then make sure the application
is set up as either a virtual directory or an application in IIS. More
likely (and (b) ), you are trying to set specific authentication for a
sub-folder or your site. The way to do this is to place the information
in the ROOT web.config and use the LOCATION element to control where it
applies to. Check out
http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=85 for
more information

Karl
 
M

Mark Oliver

Hi,

I screwed around with inetmgr.exe not really knowing what i was doing,
Something i did made everything work, i am guessing it was setting the
Application name in the Directory Tab for Properties for my site. Thanks
for the "either a virtual directory or an application in IIS" tip.

Mark
 
S

Steven Cheng[MSFT]

Hi Mark,

You're right, it is exactly the
"setting the Application name in the Directory Tab for Properties for my
site."

makes your web application work. Karl's suggestion is quite correct and
also based on the error message you provided, you can also get the ideas,
the following lines in error message:

===========
Server Error in '/' Application.
----------------------------------------------------------------------------
----
===========

means the error occur at the root of the web application and then, the
below info

======================
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.
======================

has told us that we may need to configured the application's virutal
directory as "Application". That's just what you did later.

Also, as Karl has mentioned, the elements in the web.config setting may
have different scope limitation. Some can be set in machine.config or
web.config level or sub directory's web.config setting, some may be only
allowed in machine.config / web.config level. For a complete reference,
you can have a look at the web application config file schema:

ASP.NET Settings Schema
http://msdn.microsoft.com/library/en-us/cpgenref/html/gngrfASPNETConfigurati
onSectionSchema.asp?frame=true

(You can find each element's scope requirement at the bottom of its
detailed page)

Then, if you encounter similiar error later, you can try checking such
setting first. Hope also helps.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

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

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top