[Mono-aspnet-list] Web.config, authentication error
cyrus
kornburn at gmail.com
Mon Aug 22 19:46:27 EDT 2011
Hi everybody.
I have this error on Mono 2.6.7 and Mono 2.10.2 at openvz container running
CentOS 5.6
*The section <authentication> can't be defined in this configuration file
(the allowed definition context is 'MachineToApplication').
(/var/www/htdocs/webservice/Web.Config line 30)*
/System.Configuration.ConfigurationErrorsException: The section
<authentication> can't be defined in this configuration file (the allowed
definition context is 'MachineToApplication').
(/var/www/htdocs/webservice/Web.Config line 30)
at System.Configuration.SectionInfo.ReadData
(System.Configuration.Configuration config, System.Xml.XmlReader reader,
Boolean overrideAllowed) [0x00000] in <filename unknown>:0
at System.Configuration.SectionGroupInfo.ReadContent (System.Xml.XmlReader
reader, System.Configuration.Configuration config, Boolean overrideAllowed,
Boolean root) [0x00000] in <filename unknown>:0
at System.Configuration.SectionGroupInfo.ReadData
(System.Configuration.Configuration config, System.Xml.XmlReader reader,
Boolean overrideAllowed) [0x00000] in <filename unknown>:0
at System.Configuration.SectionGroupInfo.ReadContent (System.Xml.XmlReader
reader, System.Configuration.Configuration config, Boolean overrideAllowed,
Boolean root) [0x00000] in <filename unknown>:0
at System.Configuration.SectionGroupInfo.ReadRootData
(System.Xml.XmlReader reader, System.Configuration.Configuration config,
Boolean overrideAllowed) [0x00000] in <filename unknown>:0
at System.Configuration.Configuration.ReadConfigFile (System.Xml.XmlReader
reader, System.String fileName) [0x00000] in <filename unknown>:0
at System.Configuration.Configuration.Load () [0x00000] in <filename
unknown>:0
at System.Configuration.Configuration.Init (IConfigSystem system,
System.String configPath, System.Configuration.Configuration parent)
[0x00000] in <filename unknown>:0
at System.Configuration.Configuration..ctor
(System.Configuration.InternalConfigurationSystem system, System.String
locationSubPath) [0x00000] in <filename unknown>:0
at System.Configuration.InternalConfigurationFactory.Create (System.Type
typeConfigHost, System.Object[] hostInitConfigurationParams) [0x00000] in
<filename unknown>:0
at System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration
(System.String path, System.String site, System.String locationSubPath,
System.String server, System.String userName, System.String password,
Boolean fweb) [0x00000] in <filename unknown>:0 /
Here is my web.config:
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<compilation debug="true">
<assemblies>
<add assembly="System.Runtime.Remoting,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Windows.Forms,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Drawing,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation>
<authentication mode="Windows"/>
<customErrors mode="Off"/>
</system.web>
</configuration>
I tried change mode "Windows" to "None" and "Forms" but there is no changes.
If just comment authentication part - application couldn't find type:
*Type Service not found.*
/System.Web.HttpException: Type Service not found.
at System.Web.UI.SimpleWebHandlerParser.GetTypeFromBin (System.String
tname) [0x00000] in <filename unknown>:0
at System.Web.Compilation.SimpleBuildProvider.LoadTypeFromBin
(System.Web.Compilation.BaseCompiler compiler,
System.Web.UI.SimpleWebHandlerParser parser) [0x00000] in <filename
unknown>:0
at System.Web.Compilation.GenericBuildProvider`1[TParser].GetGeneratedType
(System.CodeDom.Compiler.CompilerResults results) [0x00000] in <filename
unknown>:0
at System.Web.Compilation.BuildManagerCacheItem..ctor
(System.Reflection.Assembly assembly, System.Web.Compilation.BuildProvider
bp, System.CodeDom.Compiler.CompilerResults results) [0x00000] in <filename
unknown>:0
at System.Web.Compilation.BuildManager.StoreInCache
(System.Web.Compilation.BuildProvider bp, System.Reflection.Assembly
compiledAssembly, System.CodeDom.Compiler.CompilerResults results) [0x00000]
in <filename unknown>:0
at System.Web.Compilation.BuildManager.GenerateAssembly
(System.Web.Compilation.AssemblyBuilder abuilder,
System.Web.Compilation.BuildProviderGroup group, System.Web.VirtualPath vp,
Boolean debug) [0x00000] in <filename unknown>:0
at System.Web.Compilation.BuildManager.BuildInner (System.Web.VirtualPath
vp, Boolean debug) [0x00000] in <filename unknown>:0
at System.Web.Compilation.BuildManager.Build (System.Web.VirtualPath vp)
[0x00000] in <filename unknown>:0
at System.Web.Compilation.BuildManager.GetCompiledType
(System.Web.VirtualPath virtualPath) [0x00000] in <filename unknown>:0
at System.Web.Compilation.BuildManager.GetCompiledType (System.String
virtualPath) [0x00000] in <filename unknown>:0
at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler
(System.Web.HttpContext context, System.String verb, System.String url,
System.String filePath) [0x00000] in <filename unknown>:0
at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context,
System.String url, Boolean ignoreContextHandler) [0x00000] in <filename
unknown>:0
at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context,
System.String url) [0x00000] in <filename unknown>:0
at System.Web.HttpApplication+<Pipeline>c__Iterator2.MoveNext () [0x00000]
in <filename unknown>:0 /
but Service is the name of class in App_Code/Service.cs..
Service.asmx:
/<%@ WebService Language="C#" CodeBehind="~/App_Code/Service.cs"
Class="Service" %>
/
in App_Code/Service.cs:
/public class Service : System.Web.Services.WebService/
--
View this message in context: http://mono.1490590.n4.nabble.com/Web-config-authentication-error-tp3761591p3761591.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.
More information about the Mono-aspnet-list
mailing list