configuration error

D

Dirk

Hi,

I started with asp.net 2.0. I defined directory inetpub/wwwroot/aspnet as an
application in IIS and the directory security is set to "anonymous access"
(even when unchecked i get the error). When starting a simple file like:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"
Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server"> <title>Untitled Page</title></head>
<body> <form id="form1" runat="server">
<div> </div> </form></body></html>

I get the error here below.
Is this an problem with IIS? Any help is welcome.
Dirk
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 24: ASP.NET to identify an incoming user.
Line 25: -->
Line 26: <authentication mode="Windows" />
Line 27: <!--
Line 28: The <customErrors> section enables configuration


Source File: d:\inetpub\wwwroot\aspnet\begin\chapter02\web.config Line:
26
 
C

Chris Fulstow

Hi Dirk,

This error can sometimes happen when there's another web.config file in
a sub-directory inside your web root.

HTH,

Chris
 
J

Juan T. Llibre

Tell me...

If you "defined inetpub/wwwroot/aspnet as an Application in IIS,
why are you calling a page in d:\inetpub\wwwroot\aspnet\begin\chapter02\
which has *not* been defined as an Application in IIS, if you leave
MachineToApplication configuration lines in its web.config ?

If you want to use inetpub/wwwroot/aspnet as your application, remove this line :
Line 26: <authentication mode="Windows" />
and any other lines which define MachineToApplication beyond application level

If you want to use d:\inetpub\wwwroot\aspnet\begin\chapter02\ as your application,
create an IIS Application which points to d:\inetpub\wwwroot\aspnet\begin\chapter02\
 
D

Dirk

Thanks for replying...

I defined inetpub/wwwroot/aspnet as an Application in IIS indeed, but that
directory contains a lot of subdirectories and subsubdirectories (like
inetpub\wwwroot\aspnet\begin\chapter02).
So i thought it was enough to define the upperlevel directory 'aspnet' as
application. Because i'm testing severam things (i'm new), i allowed
"directory browsing" in the IIS properties of application 'aspnet'. So i
start my aspx pages from the directory tree.
Each subdirectory contains a file web.config. Can i just remove the
web.config in each subdirectory and keep only the web.config in the
upperlevel?
 

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,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top