[Mono-dev] Problems with roleManager and web services

Atsushi Eno atsushi at ximian.com
Tue Apr 24 13:29:57 EDT 2007


Hi,

I have also seen the same issue, and now the fix is in svn.

Atsushi Eno

Dumitru Ban wrote:
> 
> I have an application that worked fine until today when I've made an 
> update from the svn. Here is the exception I get:
>  
> Server Error in '/test' Application
> The section <roleManager> can't be defined in this configuration file 
> (the allowed definition context is 'MachineToApplication'). () ( line 193)
>  
> Description: Error processing request.
>  
> Error Message: HTTP 500. 
> System.Configuration.ConfigurationErrorsException: The section 
> <roleManager> can't be defined in this configuration file (the allowed 
> definition context is 'MachineToApplication'). () ( line 193)
>  
> Stack Trace:
>  
> System.Configuration.ConfigurationErrorsException: The section 
> <roleManager> can't be defined in this configuration file (the allowed 
> definition context is 'MachineToApplication'). () ( line 193)
>   at System.Configuration.SectionInfo.ReadData 
> (System.Configuration.Configuration config, System.Xml.XmlTextReader 
> reader, Boolean overrideAllowed) [0x00000]
>   at System.Configuration.SectionGroupInfo.ReadContent 
> (System.Xml.XmlTextReader reader, System.Configuration.Configuration 
> config, Boolean overrideAllowed, Boolean root) [0x00000]
>   at System.Configuration.SectionGroupInfo.ReadData 
> (System.Configuration.Configuration config, System.Xml.XmlTextReader 
> reader, Boolean overrideAllowed) [0x00000]
>   at System.Configuration.SectionGroupInfo.ReadContent 
> (System.Xml.XmlTextReader reader, System.Configuration.Configuration 
> config, Boolean overrideAllowed, Boolean root) [0x00000]
>   at System.Configuration.SectionGroupInfo.ReadRootData 
> (System.Xml.XmlTextReader reader, System.Configuration.Configuration 
> config, Boolean overrideAllowed) [0x00000]
>   at System.Configuration.Configuration.ReadConfigFile 
> (System.Xml.XmlTextReader reader, System.String fileName) [0x00000]
>   at System.Configuration.Configuration.Load () [0x00000]
>   at System.Configuration.Configuration.Init (IConfigSystem system, 
> System.String configPath, System.Configuration.Configuration parent) 
> [0x00000]
>   at System.Configuration.Configuration..ctor 
> (System.Configuration.InternalConfigurationSystem system, System.String 
> locationSubPath) [0x00000]
>   at System.Configuration.InternalConfigurationFactory.Create 
> (System.Type typeConfigHost, System.Object[] 
> hostInitConfigurationParams) [0x00000]
>   at System.Configuration.ConfigurationManager.OpenMachineConfiguration 
> () [0x00000]
>   at System.Web.Services.Protocols.SoapDocumentationHandler..ctor 
> (System.Type type, System.Web.HttpContext context) [0x00000]
>   at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler 
> (System.Web.HttpContext context, System.String verb, System.String url, 
> System.String filePath) [0x00000]
>   at System.Web.HttpApplication.GetHandler (System.Web.HttpContext 
> context) [0x00000]
>   at System.Web.HttpApplication+<>c__CompilerGenerated2.MoveNext () 
> [0x00000]
>  
> 04/24/2007 14:08:56
>  
>  
> In the root of the application I have a web.config file that looks 
> pretty much like this:
>  
> <?xml version="1.0"?>
> <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
>  <appSettings/>
>  <connectionStrings>
>   <add name="MySQLConnectionString" connectionString="server=localhost; 
> user id=test; password=...; database=test; pooling=false;" 
> providerName="MySql.Data.MySqlClient"/>
>  </connectionStrings>
>  <system.web>
>   <compilation debug="true">
>    <assemblies>
>     <add assembly="MySql.Data"/>
>     <add assembly="System.Transactions, Version=2.0.0.0, 
> Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
>     <add assembly="System.Configuration.Install, Version=2.0.0.0, 
> Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
>    </assemblies>
>   </compilation>
>  
>   <roleManager enabled="true" defaultProvider="MySQLRoleProvider">
>    <providers>
>     <clear/>
>     <add connectionStringName="MySQLConnectionString" 
> applicationName="/test" name="MySQLRoleProvider" 
> type="Test.Web.MySQLRoleProvider"/>
>    </providers>
>   </roleManager>
>   <authentication mode="Forms">
>    <forms loginUrl="common/login.aspx" timeout="30" 
> defaultUrl="common/login.aspx"/>
>   </authentication>
>  
>   <membership defaultProvider="MySQLMembershipProvider">
>    <providers>
>     <clear/>
>     <add name="MySQLMembershipProvider" 
> type="Test.Web.MySQLMembershipProvider" 
> connectionStringName="MySQLConnectionString" applicationName="/test" 
> requiresUniqueEmail="false" autoUnlockTimeout="30"/>
>    </providers>
>   </membership>
>  </system.web>
> </configuration>
>  
> The web service file is web_services/myWebServices.asmx.
>  
> When I'm trying this 
> http://localhost/test/web_services/myWebServices.asmx I get the exception.
>  
> If I'm accessing any other page everything works fine (i.e., 
> http://localhost/test/common/login.aspx)
>  
> Any ideas?
>  
> Thanks,
> Dumi.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list