[Mono-aspnet-list] Web.config, authentication error

Alexander M. Batishchev abatishchev at godfather.net.ru
Tue Aug 23 02:19:59 EDT 2011


MachineToApplicationAllows the section to be configured in one of the
following files:

 

.         Machine.config.

.         Root Web.config.

.         Web.config for an application.

 

This excludes Web.config files in virtual directories or a physical
subdirectory in the application.

 

>From here: http://msdn.microsoft.com/en-us/library/ms228245.aspx

 

Verify that.

 

-----Original Message-----
From: mono-aspnet-list-bounces at lists.ximian.com
[mailto:mono-aspnet-list-bounces at lists.ximian.com] On Behalf Of cyrus
Sent: Tuesday, August 23, 2011 3:46 AM
To: mono-aspnet-list at lists.ximian.com
Subject: [Mono-aspnet-list] Web.config, authentication error

 

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-tp3761591p
3761591.html

Sent from the Mono - ASP.NET mailing list archive at Nabble.com.

_______________________________________________

Mono-aspnet-list mailing list

Mono-aspnet-list at lists.ximian.com

http://lists.ximian.com/mailman/listinfo/mono-aspnet-list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-aspnet-list/attachments/20110823/0086235c/attachment-0001.html 


More information about the Mono-aspnet-list mailing list