[Mono-list] (no subject)

hlf566@sohu.com hlf566@sohu.com
Wed, 19 Mar 2003 10:09:36 +0800 (CST)


Hello my dear friend:
I am a linux lover,i am installing mono.
I am a chinese.
I would lile make a friend with you.
please mail me as quickly as possible.
Thank you very much. 
I installed it following the next step:
http://www.apacheworld.org/modmono/INSTALL
a) Install Mono 0.23
Install the Mono rpms from 
http://www.go-mono.com/download.html
b) Install Apache
httpd-2.0.40-8.i386.rpm
httpd-devel-2.0.40-8.i386.rpm
c) Install mod_mono0.3.6
http://www.apacheworld.org/modmono/
download  Red Hat 8.0 rpm,
d) XSP web server (0.3)  
http://www.go-mono.com/download.html
e) Configure Apache
Edit the /etc/httpd/conf/httpd.conf file and add the following:
MonoApplication /mono /home/user/mono/install/xsp/server/test
mkdir /var/www/.wapi/
chown apache.apache /var/www/.wapi
chmod 700 /var/www/.wapi
f) Start apache 
As root, type:
/etc/init.d/httpd start
g) Browse the examples
http://127.0.0.1/mono/index.aspx

 Now i can look  around those examples,
h) Start my application
Edit the /etc/httpd/conf/httpd.conf file and modify the following:
MonoApplication /mono /home/user/mono/install/xsp/server/temp
temp is my home dir of my application.
the application abount .net(c#) run very well on windows 2000,but i am  not able to use it very well on redhat8.0.



the following  question are the result of my program running on redhat,but my program run very well on windows2000.
1.     these .aspx file have the following lines, if i delete those lines such as "<meta name=  >",there are no errors. :
       one example:
		<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">


error page:
--------------------------------------------------------------------------------
Error
Description: Error processing request. 
Error Message: 
Stack Trace: System.ArgumentException: Arg_InvalidUTF8
Parameter name: bytes
in <0x003a2> 00 System.Text.UTF8Encoding:InternalGetChars (byte[],int,int,char[],int,uint&,uint&,bool,bool)
in <0x00039> 00 .UTF8Decoder:GetChars (byte[],int,int,char[],int)
in <0x00374> 00 System.IO.StreamReader:ReadBuffer ()
--------------------------------------------------------------------------------
 


2.    these .aspx file having  the "table" control of html_tab cann't konwed by redhat8.
  
error page:
--------------------------------------------------------------------------------
Parser Error
Description: Error parsing a resource required to service this request. Review your source file and modify it to fix this error. 
Error message: A null value was found where an object instance was required 

Source Error: 
Line 15: 				<TABLE id="Table1" style="Z-INDEX: 102; LEFT: 116px; WIDTH: 261px; POSITION: absolute; TOP: 143px; HEIGHT: 66px" cellSpacing="1" cellPadding="1" width="261" border="1" runat="server">
Line 16: 					<TR>
Source File: /usr/local/xsp-0.3/server/jianwei/index.aspx 
--------------------------------------------------------------------------------


3. oracle8i or oracle9i on linux
I write a .cs file on linux,the file can run very well,it can report the content of oracle9i or oracle8i,
can type  ename, job FROM scott.emp.     but the .aspx file report a error page as following.
error page:
--------------------------------------------------------------------------------
Error in '/mono' Application
Error
Description: Error processing request. 
Error Message: 
Stack Trace: System.MissingMethodException: A missing method exception has occurred.
in <0x00046> 06 System.Data.OracleClient.Oci.OciEnvironmentHandle:OCIEnvCreate (intptr&,System.Data.OracleClient.Oci.OciEnvironmentMode,intptr,intptr,intptr,intptr,int,intptr)
in <0x00063> 00 System.Data.OracleClient.Oci.OciEnvironmentHandle:.ctor (System.Data.OracleClient.Oci.OciEnvironmentMode)
in <0x0002c> 00 System.Data.OracleClient.Oci.OciGlue:CreateConnection (System.Data.OracleClient.OracleConnectionInfo)
in <0x0008e> 00 System.Data.OracleClient.OracleConnection:Open ()
in <0x0008c> 00 temp.manage.ChangePassword:Button2_Click (object,System.EventArgs)
in <0x00067> 01 System.MulticastDelegate:invoke_void_object_EventArgs (object,System.EventArgs)
in <0x000ac> 00 System.Web.UI.WebControls.Button:OnClick (System.EventArgs)
in <0x0005a> 00 System.Web.UI.WebControls.Button:System.Web.UI.IPostBackEventHandler.RaisePostBackEvent (string)
in <0x00020> 00 System.Web.UI.Page:RaisePostBackEvent (System.Web.UI.IPostBackEventHandler,string)
in <0x00051> 00 System.Web.UI.Page:RaisePostBackEvents ()
in <0x0016c> 00 System.Web.UI.Page:ProcessRequest (System.Web.HttpContext)
in <0x001b6> 00 .ExecuteHandlerState:Execute ()
in <0x0005e> 00 .StateMachine:ExecuteState (IStateHandler,bool&)
--------------------------------------------------------------------------------


4. microsoft sql server:  these .aspx file are able to know  the class writed by me.
my class is the following lines:
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.SqlClient;

namespace temp
{
	/// <summary>
	/// WebForm2 的摘要说明。
	/// </summary>
	public class DataConnClass : System.Web.UI.Page
	{
		private void Page_Load(object sender, System.EventArgs e)
		{
			// 在此处放置用户代码以初始化页面
		}
		public void DataOpen()
		{
			string xmlfilename,userid,password,database,server;
			xmlfilename=Server.MapPath("../dataconfig.xml");
			DataSet myDs=new DataSet();
			myDs.ReadXml(xmlfilename);
			DataRow myDataRow=myDs.Tables[0].Rows[0];
			userid=myDataRow["userid"].ToString();
			password=myDataRow["password"].ToString();
			database=myDataRow["database"].ToString();
			server=myDataRow["server"].ToString();
			sqlString="user id="+userid+";password="+password+";database="+database+";server="+server;
			dataConn.ConnectionString=sqlString;
			dataConn.Open();
		}

		public void DataClose()
		{
			dataConn.Close();
		}

		public string RemoteServer()
		{
			string xmlFileName,remoteServer;
			xmlFileName=Server.MapPath("../dataconfig.xml");
			DataSet myDataSet=new DataSet();
			myDataSet.ReadXml(xmlFileName);
			DataRow myDataRow=myDataSet.Tables[0].Rows[0];
			remoteServer=myDataRow["remoteserver"].ToString();
			return remoteServer;
		}

		private string  sqlString;
		public SqlConnection dataConn=new SqlConnection();
		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN:该调用是 ASP.NET Web 窗体设计器所必需的。
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{    
			this.Load += new System.EventHandler(this.Page_Load);
		}
		#endregion
	}
}



error page:
--------------------------------------------------------------------------------

Error
Description: Error processing request. 
Error Message: 

Stack Trace: System.NullReferenceException: A null value was found where an object instance was required
in <0x0005a> 00 temp.DataConnClass:DataOpen ()
in <0x000a7> 00 temp.manage.ChangePassword:submitButton_Click (object,System.EventArgs)
in <0x00067> 01 System.MulticastDelegate:invoke_void_object_EventArgs (object,System.EventArgs)
in <0x000ac> 00 System.Web.UI.WebControls.Button:OnClick (System.EventArgs)
in <0x0005a> 00 System.Web.UI.WebControls.Button:System.Web.UI.IPostBackEventHandler.RaisePostBackEvent (string)
in <0x00020> 00 System.Web.UI.Page:RaisePostBackEvent (System.Web.UI.IPostBackEventHandler,string)
in <0x00051> 00 System.Web.UI.Page:RaisePostBackEvents ()
in <0x0016c> 00 System.Web.UI.Page:ProcessRequest (System.Web.HttpContext)
in <0x001b6> 00 .ExecuteHandlerState:Execute ()
in <0x0005e> 00 .StateMachine:ExecuteState (IStateHandler,bool&)
--------------------------------------------------------------------------------