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.
解决方案 »
- 为什么在设计视图里页面没有显示完,没有显示滚动条?
- 如何用正则表达式匹配日期格式yyyy-mm-dd
- 注入式攻击??
- 如何在Nhibernate中映射多个程序集?
- 请问一下 我写好了一个程序,放到主机上后,所有的.net控件都看不见了 是怎么回事啊!? 在线等!
- 请教各位大师:关于CustomValidator验证控件的使用
- 求javascrippt正则表达式:取出<font color='#00000'>text</font>中的text
- 兄弟帮帮忙(sqlserver大数据量汇问题)
- 怎么统计用户登出的时间
- 后台访问前台数据
- 问个问题,不知道有没有人想过,能否返回多种类型?
- ####一个简单的问题送你20分。
方法是:
在“internet信息服务管理器”里该目录的文件夹(左侧)图标上选“属性”-》“创建”,就会多出一个应用程序名如果是远程配置,那就要用编程的方式来做了,网上有编程控制iis的方法,可以自己做个安装也。但是如果没有相应权限也不行