[Mono-list] Compilation errors ...

Azher Amin azher at niit.edu.pk
Thu Aug 9 14:34:38 EDT 2007


Now while moving to another directory following exception is thrown for 
the code below i.e. Login.aspx .Plz suggest about the resolution.

-Azher



System.TypeInitializationException: An exception was thrown by the type 
initializer for Mono.WebServer.ModMonoWorkerRequest

Server stack trace:
  at <0x00000> <unknown method>
  at Mono.WebServer.ModMonoApplicationHost.ProcessRequest (Int32 reqId, 
System.String verb, System.String queryString, System.String path, 
System.String protocol, System.String localAddress, Int32 serverPort, 
System.String remoteAddress, Int32 remotePort, System.String remoteName, 
System.String[] headers, System.String[] headerValues) [0x00000]
  at (wrapper remoting-invoke-with-check) 
Mono.WebServer.ModMonoApplicationHost:ProcessRequest 
(int,string,string,string,string,string,int,string,int,string,string[],string[])
  at (wrapper xdomain-dispatch) 
Mono.WebServer.ModMonoApplicationHost:ProcessRequest 
(object,byte[]&,byte[]&,int,string,string,string,string,string,int,string,int,string,string[],string[])

Exception rethrown at [0]:
 ---> System.Configuration.ConfigurationErrorsException: Unrecognized 
configuration section <system.webServer> () 
(/var/www/html/aspx/web.config line 83)
  at System.Configuration.ConfigInfo.ThrowException (System.String text, 
System.Xml.XmlTextReader reader) [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.OpenExeConfigurationInternal 
(ConfigurationUserLevel userLevel, System.Reflection.Assembly 
calling_assembly, System.String exePath) [0x00000]
  at 
System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection 
(System.String configKey) [0x00000]
  at System.Configuration.ConfigurationManager.GetSection (System.String 
sectionName) [0x00000]
  at System.Configuration.ConfigurationManager.get_AppSettings () [0x00000]
  at Mono.WebServer.ModMonoWorkerRequest..cctor () [0x00000] --- End of 
inner exception stack trace ---

  at (wrapper xdomain-invoke) 
Mono.WebServer.ModMonoApplicationHost:ProcessRequest 
(int,string,string,string,string,string,int,string,int,string,string[],string[])
  at (wrapper remoting-invoke-with-check) 
Mono.WebServer.ModMonoApplicationHost:ProcessRequest 
(int,string,string,string,string,string,int,string,int,string,string[],string[])
  at Mono.WebServer.ModMonoWorker.InnerRun (System.Object state) [0x00000]
  at Mono.WebServer.ModMonoWorker.Run (System.Object state) [0x00000]




Azher Amin wrote:
> Hi Martin,
>
> Thnx for quick reply. I compiled again using the following but again 
> errors, detail below. Plz suggest.
>
> Another thing is that I have this piece of code. I have the mod mono and 
> its working fine. However Login.aspx.cs which is referred in this code 
> is not in compiled form, so while copying to linux do we need to compile 
> the code or should the mono will compile it at run time ?? .. Further 
> this code shows not output justa white blank page ....
>
> Regards
> -Azher
>
> ---------------------- Login.aspx --------------
> <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" 
> AutoEventWireup="true"
>     CodeFile="Login.aspx.cs" Inherits="Login" Theme = "ThemeDesign" 
> Title="Southern Tree - Financial Management" %>
>
> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" 
> runat="Server">
>
>     <form id="form1" runat="server" >
>         <asp:Login ID="Login1" runat="server" TitleText="My Account" 
> DestinationPageUrl="~/WebPages/Client/MainPage.aspx" Log
> inButtonText="log in" OnLoggedIn="Login1_LoggedIn">
>             <CheckBoxStyle ForeColor="Black" Font-Size="Small" 
> Font-Bold="True" />
>             <LabelStyle ForeColor="Black" Font-Size="Small" 
> Font-Bold="True" />
>             <LoginButtonStyle BackColor="#FF7721" BorderStyle="Outset" 
> BorderWidth="3px" Font-Bold="True"
>                 Font-Size="Small" ForeColor="White" />
>             <FailureTextStyle Font-Size="Small" Font-Bold="True" />
>             <TitleTextStyle Font-Bold="True" ForeColor="#FF7721" />
>         </asp:Login>
>         &nbsp;&nbsp;
>         </form>
>
> </asp:Content>
>
> ------------------------- compile from console -------
> [root at host]# mcs Login.aspx.cs -r:System.Web.dll -r:System.Data.dll 
> -r:System.Web.dll
>
> Login.aspx.cs(9,7): error CS0234: The type or namespace name `WebParts' 
> does not exist in the namespace `System.Web.UI.WebControls'. Are you 
> missing an assembly reference?
> Login.aspx.cs(9,1): error CS0246: The type or namespace name 
> `WebControls.WebParts' could not be found. Are you missing a using 
> directive or an assembly reference?
> Login.aspx.cs(9,7): error CS0234: The type or namespace name `WebParts' 
> does not exist in the namespace `System.Web.UI.WebControls'. Are you 
> missing an assembly reference?
> Login.aspx.cs(9,1): error CS0246: The type or namespace name 
> `WebControls.WebParts' could not be found. Are you missing a using 
> directive or an assembly reference?
> Compilation failed: 4 error(s), 0 warnings
> [root at host]#
>
> -------------------------------
>
> Martin Trejo wrote:
>   
>> Did you include the reference to System.Web assembly when compiling?
>>
>> 2007/8/9, Azher Amin <azher at niit.edu.pk <mailto:azher at niit.edu.pk>>:
>>
>>     Hi gurus,
>>
>>     I am trying to compile a .Net aspx using mono, however I am
>>     getting the
>>     following error, plz suggest the possible solutions.
>>     I am using mono 1.2.4
>>
>>     Regards
>>     -Azher Amin
>>
>>
>>     Login.aspx.cs (13,30): error CS0234: The type or namespace name
>>     `UI' does
>>     not exist in the namespace `System.Web'. Are you missing an assembly
>>     reference?
>>     Compilation failed: 1 error(s), 0 warnings
>>
>>     Code:
>>     ====
>>     using System;
>>     using System.Data;
>>     using System.Configuration;
>>     using System.Collections;
>>     using System.Web;
>>     using System.Web.Security;
>>     using System.Web.UI;
>>     using System.Web.UI.WebControls;
>>     using System.Web.UI.WebControls.WebParts ;
>>     using System.Web.UI.HtmlControls;
>>     using System.Data.SqlClient;
>>
>>     public partial class Login : System.Web.UI.Page
>>     {
>>         protected void Page_Load(object sender, EventArgs e)
>>         {
>>
>>
>>
>>     --
>>     This message has been scanned for viruses and
>>     dangerous content by MailScanner, and is
>>     believed to be clean.
>>
>>     _______________________________________________
>>     Mono-list maillist  -   Mono-list at lists.ximian.com
>>     <mailto:Mono-list at lists.ximian.com>
>>     http://lists.ximian.com/mailman/listinfo/mono-list
>>
>>
>>
>>
>> -- 
>> Saludos,
>>
>> Martín Trejo Chávez
>> http://chilli-coder.blogspot.com
>> -- 
>> This message has been scanned for viruses and
>> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
>> believed to be clean. 
>>     
>
>
>   


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the Mono-list mailing list