I have searched this error message on Internet with Google. All solutions I found cannot solve my problem.
Our ASP.NET 2.0 Web application is deployed to 20 machines (some are Win2000, some are Win2003). There's a load balance mechanism to dispatch user requests.
I tested my Web app on every server machine, I mean, I use remote desktop to deploy, configure, and test locally on each server machine, and they're all work fine.
However, when I test with load balance (e.g. through
http://mycompany.com/myapp), IE6 tell me: configuration error. Then I go to each server machine and view Application event log, it shows:
-----------------------------< BEGIN EVENT LOG>------------------------------
Event code: 3008
Event message: Configuration error.
Event time: 2006/7/6 下午 02:14:01
Event time (UTC): 2006/7/6 上午 06:14:01
Event ID: 5a4e4ad164e14bf2bf0ef264efe56c98 Event sequence: 2 Event occurrence: 1 Event detail code: 0
Application information:
Application domain: /LM/W3SVC/3/Root-5-127966400410625000
Trust level: Full
Application Virtual Path: /
Application Path: C:\Inetpub\wwwroot\
Machine name: WSYS6
Process information:
Process ID: 2416
Process name: aspnet_wp.exe
Account name: WSYS6\ASPNET
Exception information:
Exception type: ConfigurationErrorsException
Exception 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. (C:\Inetpub\wwwroot\MyWeb\web.config line 68)
Request information:
Request URL: http://web.sys.myhome.com.tw:8081/MyWeb/Default.aspx
Request path: /myweb/Default.aspx
User host address: 219.91.13.151
User:
Is authenticated: False
Authentication Type:
Thread account name: WSYS6\ASPNET
Thread information:
Thread ID: 5
Thread account name: WSYS6\ASPNET
Is impersonating: False
Stack trace: 於
System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean
ignoreLocal)
於 System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors
schemaErrors)
於 System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String
configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object&
resultRuntimeObject)
於 System.Configuration.BaseConfigurationRecord.GetSection(String
configKey, Boolean getLkg, Boolean checkPermission)
於 System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
於 System.Web.Configuration.RuntimeConfig.GetSectionObject(String sectionName)
於 System.Web.Configuration.RuntimeConfig.GetSection(String
sectionName, Type type, ResultsIndex index)
於 System.Web.Configuration.RuntimeConfig.get_Identity()
於 System.Web.ClientImpersonationContext.Start(HttpContext context, Boolean throwOnError)
於 System.Web.HttpApplication.OnThreadEnter()
於 System.Web.HttpApplication.ResumeSteps(Exception error)
-----------------------------< END EVENT LOG>------------------------------
I have checked IIS settings for all server machines, I even re-deploy my app on each server. It simply works well locally, but not with load balance mechanism. (so it's not a problem that a virtual directory not being configured as an application.)
The error message from event log says there is an error in my Web app's web.config, Line 68. but line 68 is just a comment. My Web application contains only one web.config in the root folder, and its content is very simple, I didn't put any special elements/attributes
in web.config.
I have fought with this problem for 3 days and I don't have any idea now.
Any suggestion would be greatly appreciated.