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.
--------------------------------------------------------------------------------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.
解决方案 »
- asp.net WAP开发的占位符问题
- 网站发布后出现ConnectionString 属性尚未初始化。
- 未能初始化 AppDomain:/LM/W3SVC/1/Root,操作系统windows xp home ,iis5.0+vs2005
- AspNetPager的存储过程
- 使用VS临时的WEB服务器浏览能够连接到数据库, 配置在IIS6.0下不能连接到数据库
- JAVASCRIPT openModelWin()
- 连接别人的access数据库怎么连?
- asp.net2.0框架 如何隐藏水平滚动条
- ExecuteReader返回一个SqlDataReader和控件绑定,请问数据库连接是在什么时候关闭的?
- 求购CRM(客户关系管理系统)、物流系统、人力资源管理系统...
- 问个问题,不知道有没有人想过,能否返回多种类型?
- ####一个简单的问题送你20分。
方法是:
在“internet信息服务管理器”里该目录的文件夹(左侧)图标上选“属性”-》“创建”,就会多出一个应用程序名如果是远程配置,那就要用编程的方式来做了,网上有编程控制iis的方法,可以自己做个安装也。但是如果没有相应权限也不行