View Full Version : Web.config error
--------------------------------------------------------------------------------ckchinApr 5, 2002, 21:29
I tried to test run my first asp.net page and found the following error. I hope that anyone of you can help me out. Thanks in advance.When try to run the ASP.net page, I always faced trouble of Configuration error, as follows: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 35: "Passport" and "None"
Line 36: -->
Line 37: <authentication mode="None" /> 
Line 38: 
Line 39: <!-- APPLICATION-LEVEL TRACE LOGGING
Source File: c:\inetpub\wwwroot\cc\bookstore\csharp\web.config Line: 37--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET
Version:1.0.3705.0 
What is the possible error?I tried to change the authentication mode form "None" to "Forms", it does not fixes the error.--------------------------------------------------------------------------------alexmingApr 6, 2002, 07:39
A couple of things come to mind:1) Is the virtual directory set up as an Application?2) Does the directory have the correct permissions for the user?3) Did you compile your application?4) Is this running on your local machine or on a web host?I am just throwing things out there since I have yet to see all of the possible .NET error messages out there.
Anyone else?
HTH--------------------------------------------------------------------------------ckchinApr 6, 2002, 10:39
Hi,Here is my answer for your question:Is the virtual directory set up as an Application? 
Yes, I did have my folder of the ASP.net as vertual directory. BUT to set up as application I did find but cannot figure our how can I set up it as an application. My os is W2000 Pro. I checked through this, In the IIS I right click the 'folder' name, in this case bookstore, under the default web site and went through the propertise pop-up window... I can't find the way to set it up as an application. Help needed in this area. :bawling: Does the directory have the correct permissions for the user? I do not understand this question and how to set it up using correct permission. Hence, guideline is much appreciated.Did you compile your application? I do not know whether I did compile the application or not. I use codecharge (http://www.codecharge.com) to generate this bookstore application in C# (ASP.net) and test run it. What I got is the error submitted by me for help.Is this running on your local machine or on a web host? I test run it on local machine.Finally, I hope that by answering your question I can get my problem solved as soon as possible. Just for information. I did face this similar problem when I tried to test run certain asp.net script available at the ASP.NET QuickStart Tutorial come with the VS.net.BUT, I can run the sample script of asp.net job site from the book ASP.NET UNLEASHED by Stephen Walther.I really do not undertstand the reason. I read through and found out that possibility that it relates to machine.config file??? Is it?Help needed. Thanks in advance.--------------------------------------------------------------------------------ckchinApr 6, 2002, 17:29
Alright I solved it. Actually, there is nothing wrong with the web.config and the machin.config files.I faced the error because I use EditPlus to run the script. I suppose test the script with the url of http://localhost/bookstore/ BUT when I always test it using EditPlus, the test url is http://localhost/codecharge/bookstore (I place the bookstore folder/files like this c:\Inetpub\wwwroot\codecharge\bookstore) which is not the virtual directory setting. What a silly I made.