Hi, 

no i am sorry it doesnot work either... I really think that it comes from the 
library that are not linked or something like that but i have no idea how to 
link them or add the path where they are when i am compiling...
I still get the same error message...
I am going to try this MONO_PATH modification... 


Thanks for your help Mario, if you ever get that dll i am trying to generate....


Well to give you all my code : 


------ Start AssemblyInfo.cs --------------
using System.Reflection;
using System.Runtime.CompilerServices;

//
// General Information about an assembly is controlled through the following 
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]         

//
// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Revision and Build 
Numbers 
// by using the '*' as shown below:

[assembly: AssemblyVersion("1.0.*")]


[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]

------ end AssemblyInfo.cs --------------



------ start Global.asax  --------------

using System;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.SessionState;

namespace WebTest 
{
        /// <summary>
        /// Summary description for Global.
        /// </summary>
        public class Global : System.Web.HttpApplication
        {
                /// <summary>
                /// Required designer variable.
                /// </summary>
                private System.ComponentModel.IContainer components = null;

                public Global()
                {
                        InitializeComponent();
                }       
                
                protected void Application_Start(Object sender, EventArgs e)
                {

                }
 
                protected void Session_Start(Object sender, EventArgs e)
                {

                }

                protected void Application_BeginRequest(Object sender, 
EventArgs e)
                {

                }

                protected void Application_EndRequest(Object sender, EventArgs 
e)
                {

                }

                protected void Application_AuthenticateRequest(Object sender, 
EventArgs e)
                {

                }

                protected void Application_Error(Object sender, EventArgs e)
                {

                }

                protected void Session_End(Object sender, EventArgs e)
                {

                }

                protected void Application_End(Object sender, EventArgs e)
                {

                }
                        
                #region Web Form Designer generated code
                /// <summary>
                /// Required method for Designer support - do not modify
                /// the contents of this method with the code editor.
                /// </summary>
                private void InitializeComponent()
                {    
                        this.components = new System.ComponentModel.Container();
                }
                #endregion
        }
}



------ end Global.asax  --------------


------ start Default.aspx  --------------


<%@ Page language="c#" Codebehind="Default.aspx.cs" AutoEventWireup="false" 
Inherits="WebTest._Default" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
        <HEAD>
                <title>Default</title>
                <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 
7.1">
                <meta name="CODE_LANGUAGE" Content="C#">
                <meta name="vs_defaultClientScript" content="JavaScript">
                <meta name="vs_targetSchema" 
content="http://schemas.microsoft.com/intellisense/ie5";>
        </HEAD>
        <body>
                <form id="Form1" method="post" runat="server">
                        <P>
                                <asp:Label id="LBSQL" 
runat="server">Label</asp:Label><BR>
                                <asp:Button id="BTGO" runat="server" Text="GO 
>>"></asp:Button></P>
                        <P>
                                <asp:Label id="LBResult" runat="server" 
BackColor="#FFFFC0">Label</asp:Label></P>
                </form>
        </body>
</HTML>

------ end Default.aspx  --------------




------ start Default.aspx.cs  --------------

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.OracleClient;

namespace WebTest
{
        /// <summary>
        /// Summary description for _Default.
        /// </summary>
        public class _Default : System.Web.UI.Page
        {
                protected System.Web.UI.WebControls.Button BTGO;
                protected System.Web.UI.WebControls.Label LBResult;
                protected System.Web.UI.WebControls.Label LBSQL;
        
                private void Page_Load(object sender, System.EventArgs e)
                {
                        // Put user code to initialize the page here
                }

                #region Web Form Designer generated code
                override protected void OnInit(EventArgs e)
                {
                        //
                        // CODEGEN: This call is required by the ASP.NET Web 
Form Designer.
                        //
                        InitializeComponent();
                        base.OnInit(e);
                }
                
                /// <summary>
                /// Required method for Designer support - do not modify
                /// the contents of this method with the code editor.
                /// </summary>
                private void InitializeComponent()
                {    
                        this.BTGO.Click += new 
System.EventHandler(this.BTGO_Click);
                        this.Load += new System.EventHandler(this.Page_Load);

                }
                #endregion

                private void BTGO_Click(object sender, System.EventArgs e)
                {
                        LBResult.Text = "";
                        LBSQL.Text =  "SELECT COUNT(*) AS COUNTER FROM T_USER";

                        string connectionString = 
                                "Data Source=XXXXX;User 
ID=XXXXXX;Password=XXXXXX;";
                        OracleConnection dbcon = null;
                        dbcon = new OracleConnection (connectionString);
                        dbcon.Open ();
                        OracleCommand dbcmd = dbcon.CreateCommand ();
                        string sql = LBSQL.Text;
                        dbcmd.CommandText = sql;                        
        
                        OracleDataReader reader = dbcmd.ExecuteReader ();
                        
                        while(reader.Read()) 
                        {
                                LBResult.Text += (string) 
reader["COUNTER"].ToString() + "<BR>";
                        }

                        reader.Close ();
                        reader = null;
                        dbcmd.Dispose ();
                        dbcmd = null;
                        dbcon.Close ();
                        dbcon = null;
                }
        }
}
 

------ end Default.aspx.cs  --------------


> Message du 07/04/05 17:37
> De : "Mario CarriÃn" <[EMAIL PROTECTED]>
> A : [EMAIL PROTECTED]
> Copie &agrave; : [email protected]
> Objet : Re: [Mono-list] Cannot find Assembly ASP
> 
> On Thu, 2005-04-07 at 15:12 +0200, Gilles FAVIER wrote:
> > Hi,
> > 
> > I am trying to connect to an Oracle database, when i am running my script 
> > as an exe file, it compiles and then when i execute it works but when i try 
> > to it through a web page, i cannot compile the pages, i get the following 
> > error message when i run : 
> > 
> > mcs /t:library /out:WebTest.dll -r:System -r:System.Data 
> > -r:System.Collections -r:System.ComponentModel -r:System.Drawing 
> > -r:System.Web -r:System.Web.SessionState -r:System.Web.UI 
> > -r:System.Web.UI.WebControls -r:System.Web.UI.HtmlControls 
> > -r:System.Data.OracleClient  AssemblyInfo.cs Default.aspx.cs Global.asax.cs
> > error CS0006: Cannot find assembly `System.Collections'
> > Log:
> > error CS0006: Cannot find assembly `System.ComponentModel'
> > Log:
> > error CS0006: Cannot find assembly `System.Web.SessionState'
> > Log:
> > error CS0006: Cannot find assembly `System.Web.UI'
> > Log:
> > error CS0006: Cannot find assembly `System.Web.UI.WebControls'
> > Log:
> > error CS0006: Cannot find assembly `System.Web.UI.HtmlControls'
> > Log:
> > Compilation failed: 6 error(s), 0 warnings
> > 
> Try adding the '.dll' to the '-r's, example:
> 
> mcs /t:library /out:WebTest.dll -r:System.dll -r:System.Data.dll
> -r:System.Collections.dll -r:System.ComponentModel.dll ....
> 
> -- 
> Cheers
> ----------
> Mario CarriÃn
> http://monouml.sourceforge.net
> 
> 
>

_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to