[Mono-list] MonoBasic and asp.net

2006-01-17 Thread beniniva


Hi,
could Mono (mbas compiler) run simple .aspx pages with vb.net code?

how?


thanks,

Valentina
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Asp.Net/vb with mono

2005-11-20 Thread beniniva
Hi,
Is there someone that it has used mono in order to realize aspx pages with
visual basic?

I think to mistake something because when I try to visualize a simple page aspx
of test (with a button and label) mbas compile with no errors but I get this
error from the browser:
---
Error message: /tmp/apache-temp-aspnet-0/8b21120a/57617.0.vb(66,0) : error
BC30201: Expression expected
/tmp/apache-temp-aspnet-0/8b21120a/57617.0.vb(67,45) : error BC30201:
Expression expected /tmp/apache-temp-aspnet-0/8b21120a/57617.0.vb(69,16) :
error BC30087: 'End If' is not having a corresponding 'If'
/tmp/apache-temp-aspnet-0/8b21120a/57617.0.vb(72,34) : error BC2: Parsing
error

File name: /usr/lib/xsp/test/WebForm1.aspx

Source File: /tmp/apache-temp-aspnet-0/8b21120a/57617.0.vb
---

I've mono 1.1.09, fedora core 4 and Apache with mod_mono.

I’ve copied the WebForm1.aspx file under usr/lib/xsp/test and the WebForm1.dll
under usr/lib/xsp/test/bin.

What I've mistaken?
What I've forgotten?

This is the .vb code (Written with Visual Studio.NET):
---
Public Class WebForm1
Inherits System.Web.UI.Page

#Region  Codice generato da Progettazione Web Form 

System.Diagnostics.DebuggerStepThrough()
Private Sub InitializeComponent()
End Sub
Protected WithEvents Button1 As System.Web.UI.WebControls.Button
Protected WithEvents Label1 As System.Web.UI.WebControls.Label
Protected WithEvents Label2 As System.Web.UI.WebControls.Label

Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
   InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
   'Inserire qui il codice utente necessario per inizializzare la pagina
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
   Label2.Visible = True
End Sub
End Class
--

This is the .aspx code (Written with Visual Studio.NET):
--
%@ Page Language=vb AutoEventWireup=false Codebehind=WebForm1.aspx.vb
Inherits=test.WebForm1%
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
HTML
HEAD
titleWebForm1/title
meta name=GENERATOR content=Microsoft Visual Studio .NET 7.1
meta name=CODE_LANGUAGE content=Visual Basic .NET 7.1
meta name=vs_defaultClientScript content=JavaScript
meta name=vs_targetSchema
content=http://schemas.microsoft.com/intellisense/ie5;
/HEAD
body MS_POSITIONING=GridLayout
form id=Form1 method=post runat=server
asp:Button id=Button1 style=Z-INDEX: 101; LEFT: 264px; POSITION: absolute;
TOP: 96px runat=server
Text=Button/asp:Button
asp:Label id=Label1 style=Z-INDEX: 102; LEFT: 80px; POSITION: absolute; TOP:
96px runat=server
Width=152pxClicca il bottone:/asp:Label
asp:Label id=Label2 style=Z-INDEX: 103; LEFT: 184px; POSITION: absolute;
TOP: 184px runat=server
Font-Size=Large Visible=FalseHai cliccato il bottone!/asp:Label
/form
/body
/HTML
-

Could anybody help me?
Thank's to all,

vale.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Problem with .aspx pages

2005-11-19 Thread beniniva
Hi,
I’ve a simple .aspx page with .vb code that I’ve written with visual studio .net
on Windows. I would like to test it on Linux with mono
I’ve compiled with no error the .vb file with mbas :

[EMAIL PROTECTED] Desktop]# mbas -t:library -r:System.Data.dll
-r:System.Drawing.dll -r:System.Web.dll -r:ByteFX.Data.dll WebForm1.aspx.vb
-o:WebForm1.dll
MonoBASIC Compiler  0.96.2.0 - (c)2002, 2003, 2004, 2005 Rafael Teixeira

THIS IS AN ALPHA SOFTWARE.

Compilation succeeded
[EMAIL PROTECTED] Desktop]#

I’ve copied the WebForm1.aspx file under usr/lib/xsp/test and the WebForm1.dll
under usr/lib/xsp/test/bin
When I visit http://127.0.0.1/demo/WebForm1.aspx I get this error:

Server Error in '/demo' Application
Compilation Error
Description: Error compiling a resource required to service this request. Review
your source file and modify it to fix this error.

Error message: /tmp/apache-temp-aspnet-0/8b21120a/57617.0.vb(66,0) : error
BC30201: Expression expected
/tmp/apache-temp-aspnet-0/8b21120a/57617.0.vb(67,45) : error BC30201:
Expression expected /tmp/apache-temp-aspnet-0/8b21120a/57617.0.vb(69,16) :
error BC30087: 'End If' is not having a corresponding 'If'
/tmp/apache-temp-aspnet-0/8b21120a/57617.0.vb(72,34) : error BC2: Parsing
error

File name: /usr/lib/xsp/test/WebForm1.aspx

Source File: /tmp/apache-temp-aspnet-0/8b21120a/57617.0.vb

Line 66: MyBase.New
Line 67: If ((ASP.WebForm1_aspx.__intialized = false)) Then
Line 68: ASP.WebForm1_aspx.__intialized = true
Line 69: End If
Line 70: End Sub
Line 71:
Line 72: Protected Overrides Property AutoHandlers As Integer



Why?
Could anybody help me?

Thank's,

Valentina.

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] mbas error

2005-11-12 Thread beniniva
Hi,
I'm trying to compile a simple code Prova.aspx.vb, but I get this error:

[EMAIL PROTECTED] Desktop]# mbas /t:library /out:Prova.dll Prova.aspx.vb
MonoBASIC Compiler  0.96.2.0 - (c)2002, 2003, 2004, 2005 Rafael Teixeira

THIS IS AN ALPHA SOFTWARE.

syntax error, got token `IDENTIFIER'
Prova.aspx.vb(2,7) error BC2: Parsing error
Compilation failed: 1 Error(s), 0 warnings

---Prova.aspx.vb
Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click

Label1.Visible = True

Label1.Text = Hai cliccato il bottone

End Sub
End Class
---
Why?

How I can compile this file?

thank's,

Valentina.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] To compile with mono mbas

2005-11-10 Thread beniniva
Hi,

Sorry for the “stupid question” but I'm new in mono/mbas.

I have Form.aspx and Form.aspx.vb files with the imports
System.Windows.Forms, System.Data and MySql.Data.MySqlClient

What I have to do to compile?

Thank’s to all,

Valentina.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Problem with mod_mono and Apache config file

2005-11-09 Thread beniniva

Hi!
Thank you very much, now I visit http://localhost/demo/index.aspx with no
problem.
I have a question...
I have always used mono with asp.net/C#.
Could I use mono with asp.net/vb.net?
Thank’s

Valentina.

Scrive Gonzalo Paniagua Javier [EMAIL PROTECTED]:

 On Mon, 2005-11-07 at 21:02 +0100, [EMAIL PROTECTED] wrote:

503 Service Temporarily Unavailable  The server is temporarily unable to
  service your request due to maintenance downtime or capacity problems.
 Please
  try again later.
 
  Any ideas?

   * Check the error_log from apache.
   * Remove any /tmp/.wapi directory
   * Remove any /tmp/mod_mono* file
   * Stop apache, ensure that the mono process died and start apache
 again.

 -Gonzalo


 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list




___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Problem with mod_mono and Apache config file

2005-11-07 Thread beniniva

Hi,  thank's for your reply.
I've Fedora Core4, Apache 2.0.54, and apache devel 2.0.54.
I've reinstalled mod_mono-1.1.9.2, I added the following lines in the httpd
config file:

LoadModule mono_module modules/mod_mono.so

  Alias /demo /usr/lib/xsp/test

  AddMonoApplications default /demo:/usr/lib/xsp/test
  Location /demo
  SetHandler mono
  /Location

and Apache started without errors, but nw I get this error when I visit
http://localhost/demo/index.aspx:

  503 Service Temporarily Unavailable  The server is temporarily unable to
service your request due to maintenance downtime or capacity problems. Please
try again later.

Any ideas?

Thank's

Valentina.


Scrive Gonzalo Paniagua Javier [EMAIL PROTECTED]:

 On Sun, 2005-11-06 at 21:24 +0100, [EMAIL PROTECTED] wrote:
  Hi,
  I try to configure Apache to load mod_mono module.
  In the Apache config file I add the following line:
 
  LoadModule mono_module modules/mod_mono.so
 
  but when I type the command httpd to start Apache I got this error:
 
  Syntax error on line 193 of /etc/httpd/conf/httpd.conf:
  Cannot load /etc/httpd/modules/mod_mono.so into server:
  /etc/httpd/modules/mod_mono.so: undefined symbol: ap_null_cleanup
  [EMAIL PROTECTED] ~]#
 
  what I can do?

 What version of apache are you running? What version of the apache
 development libraries?

 -Gonzalo


 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list




___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Bug in OdbcDataAdapter or DataSet ???

2004-08-26 Thread beniniva

Ok, I've done that. bug #64103.

Valentina.

Scrive T Sureshkumar [EMAIL PROTECTED]:

 Please file a bug in bugzilla at http://bugzilla.ximian.com under
 System.Data to track the bug, if you have not done yet.
 
 And, please attach all the code  dump you sent to mailing list.
 
 thanks,
 suresh.
 
  [EMAIL PROTECTED] 8/25/2004 6:46:10 PM 
 
 Hi,
 I've an asp.net web application that shows, through an odbc connection
 to a
 mysql database, the content of the table chosen from a DropDownList.
 The code goes well on windows but on linux with mono 1.01 not all the
 tables
 are
 shown correctly.
  
 I've also tried to run a c# example that makes the same thing and it
 works
 wellso I think that is not a problem of mysql or odbc connection,
 but
 rather it may be a problem of odbcDataAdapter or Data set
  
 Is it true?
 Could anybody help me?  
 
 -
 asp.net web application:
 -
 OdbcConnection conn = new OdbcConnection
 (DRIVER=MySQL;SERVER=localhost;DATABASE=tdmio;UID=root;PASSWORD=rootpwd
 ;);
OdbcDataAdapter daTabella = new OdbcDataAdapter(select * from 
 +Tabella +
 , conn);
DataSet Ds = new DataSet();
conn.Open();
daTabella.Fill(Ds, Tabella);
conn.Close();
DataGrid1.DataSource= Ds;
DataGrid1.DataBind();
 
 
 c# example:  
 
 OdbcConnection conn = new OdbcConnection
 (DRIVER=MySQL;SERVER=localhost;DATABASE=tdmio;UID=root;PASSWORD=rootpwd
 );
conn.Open();
OdbcCommand com = new OdbcCommand();
com = conn.CreateCommand();
com.CommandText=Select * from  +nome+ ;
OdbcDataReader dbReader =null;
dbReader = com.ExecuteReader();
Console.WriteLine();
for (int i=0; idbReader.FieldCount;i++)
{
 Console.Write({0},dbReader.GetName(i).PadLeft(10,' '));
}
Console.WriteLine();
while (dbReader.Read())
{
 for (int j=0;jdbReader.FieldCount;j++)
 {
  Console.Write({0},
 dbReader.GetValue(j).ToString().PadRight(20,'
 '));
 }
 Console.WriteLine();
}  
dbReader.Close();
conn.Close();
 -
  
 Thanks a lot,
  
 Valentina. 
 ___
 Mono-list maillist  -  [EMAIL PROTECTED] 
 http://lists.ximian.com/mailman/listinfo/mono-list
 ___
 Mono-list maillist  -  [EMAIL PROTECTED]
 http://lists.ximian.com/mailman/listinfo/mono-list
 



___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Bug in OdbcDataAdapter or DataSet ???

2004-08-25 Thread beniniva

Hi,
I've an asp.net web application that shows, through an odbc connection to a
mysql database, the content of the table chosen from a DropDownList.
The code goes well on windows but on linux with mono 1.01 not all the tables
are
shown correctly.
 
I've also tried to run a c# example that makes the same thing and it works
wellso I think that is not a problem of mysql or odbc connection, but
rather it may be a problem of odbcDataAdapter or Data set
 
Is it true?
Could anybody help me?  

-
asp.net web application:
-
OdbcConnection conn = new OdbcConnection
(DRIVER=MySQL;SERVER=localhost;DATABASE=tdmio;UID=root;PASSWORD=rootpwd ;);
   OdbcDataAdapter daTabella = new OdbcDataAdapter(select * from  +Tabella +
, conn);
   DataSet Ds = new DataSet();
   conn.Open();
   daTabella.Fill(Ds, Tabella);
   conn.Close();
   DataGrid1.DataSource= Ds;
   DataGrid1.DataBind();


c# example:  

OdbcConnection conn = new OdbcConnection
(DRIVER=MySQL;SERVER=localhost;DATABASE=tdmio;UID=root;PASSWORD=rootpwd );
   conn.Open();
   OdbcCommand com = new OdbcCommand();
   com = conn.CreateCommand();
   com.CommandText=Select * from  +nome+ ;
   OdbcDataReader dbReader =null;
   dbReader = com.ExecuteReader();
   Console.WriteLine();
   for (int i=0; idbReader.FieldCount;i++)
   {
Console.Write({0},dbReader.GetName(i).PadLeft(10,' '));
   }
   Console.WriteLine();
   while (dbReader.Read())
   {
for (int j=0;jdbReader.FieldCount;j++)
{
 Console.Write({0}, dbReader.GetValue(j).ToString().PadRight(20,'
'));
}
Console.WriteLine();
   }  
   dbReader.Close();
   conn.Close();
-
 
Thanks a lot,
 
Valentina. 
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Problem with asp.net OdbcDataAdapter or DataSet.

2004-08-24 Thread beniniva
Hi,

I've an asp.net web application that shows, through an odbc connection to a
mysql database, the content of the table chosen from a DropDownList.
The code go well on windows but on linux with mono 1.01 not all the tables are
shown correctly.

I've also tried to run a c# example that makes the same thing and it works
wellso I think that is not a problem of mysql or odbc connection, but
rather it may be a problem of odbcDataAdapter or Data set

Is it true?
Could anybody help me?

asp.net web application: WebForm1VisuaTabelle.aspx,
WebForm1VisuaTabelle.aspx.cs
c# example: ProvaVisuaTabella.cs

Thanks a lot,

Valentina.


WebForm1VisuaTabelle.aspx
Description: Binary data
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.Odbc;

namespace VisuaTabelle
{
	/// summary
	/// Summary description for WebForm1.
	/// /summary
	public class WebForm1 : System.Web.UI.Page
	{
		private void Page_Load(object sender, System.EventArgs e)
		{
			// Put user code to initialize the page here
			Tabella = DropDownList1.SelectedItem.Text;
		}

		protected System.Web.UI.WebControls.Button ButtonRicerca;
		protected System.Web.UI.WebControls.DataGrid DataGrid1;
		protected System.Web.UI.WebControls.Label Label1;
		protected System.Web.UI.WebControls.Label Label2;
		protected System.Web.UI.WebControls.DropDownList DropDownList1;
		protected System.Web.UI.WebControls.Button Button1;

		string Tabella = null;
		#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.ButtonRicerca.Click += new System.EventHandler(this.ButtonRicerca_Click);
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion

		private void ButtonRicerca_Click(object sender, System.EventArgs e)
		{
			Label2.Text = Tabella + Tabella;
			//OdbcConnection conn = new OdbcConnection(DRIVER={MySQL ODBC 3.51 Driver};+SERVER=localhost;+DATABASE=tdmio;+UID=root;+PASSWORD=rootpwd;);
			OdbcConnection conn = new OdbcConnection (DRIVER=MySQL;SERVER=localhost;DATABASE=tdmio;UID=root;PASSWORD=rootpwd;);
			OdbcDataAdapter daTabella = new OdbcDataAdapter(select * from  +Tabella + , conn);
			DataSet Ds = new DataSet();
			conn.Open();
			daTabella.Fill(Ds, Tabella);
			conn.Close();
			DataGrid1.DataSource= Ds;
			DataGrid1.DataBind();
		}
	}
}
using System;
using System.Data.Odbc;

namespace ProvaVisuaTabelle
{
	/// summary
	/// Summary description for Class1.
	/// /summary
	class Class1
	{
		/// summary
		/// The main entry point for the application.
		/// /summary
		[STAThread]
		static void Main(string[] args)
		{
			Console.WriteLine(Inserisci il nome della tabella: );
			string nome = Console.ReadLine();
			//OdbcConnection conn = new OdbcConnection(DRIVER={MySQL ODBC 3.51 Driver};+SERVER=localhost;+DATABASE=tdmio;+UID=root;+PASSWORD=rootpwd;);
			OdbcConnection conn = new OdbcConnection (DRIVER=MySQL;SERVER=localhost;DATABASE=tdmio;UID=root;PASSWORD=rootpwd);
			conn.Open();
			OdbcCommand com = new OdbcCommand();
			com = conn.CreateCommand();
			com.CommandText=Select * from  +nome+ ;
			OdbcDataReader dbReader =null;
			dbReader = com.ExecuteReader();
			Console.WriteLine();
			for (int i=0; idbReader.FieldCount;i++)
			{
Console.Write({0},dbReader.GetName(i).PadLeft(10,' '));
			}
			Console.WriteLine();
			while (dbReader.Read())
			{
for (int j=0;jdbReader.FieldCount;j++)
{
	//valore = (string)dbReader.GetValue(j);
	Console.Write({0}, dbReader.GetValue(j).ToString().PadRight(20,' '));
}
Console.WriteLine();
			}

			
			dbReader.Close();
			conn.Close();
		}
	}
}

[Mono-list] Problem with a web serivce method.

2004-08-23 Thread beniniva
Hi,
I've a web service example, called Service1.asmx, that contains four methods.
The example works well on Windows, but when I try to execute it on Mono I have
some problems , particularly when I invoke the SessioneAttiva method,  I
obtain this error:

The remote server returned an error: (500) Internal Server Error.
Unable to retreive error information from ODBC driver manager

What it means?

Please help me.

I've Fedora Core 2, Mono 1.01 and I use a mysql database (4.1.3-beta-standard)
via unixOdbc (2.2.8).


Thanks,

Valentina.
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
using System.Data.Odbc;

namespace ServiceTdProva
{
	
	public class Service1 : System.Web.Services.WebService
	{
		public Service1()
		{
			InitializeComponent();
		}

		#region Component Designer generated code
		
	
		private IContainer components = null;
		
		private void InitializeComponent()
		{
		}

		protected override void Dispose( bool disposing )
		{
			if(disposing  components != null)
			{
components.Dispose();
			}
			base.Dispose(disposing);		
		}
		
		#endregion

		
		
		string DataOdierna=DateTime.Today.Year.ToString() +-+ DateTime.Today.Month.ToString() +-+ DateTime.Today.Day.ToString();

		public string CatchProblema()
		{	
			string problema=0;
			//OdbcConnection conn = new OdbcConnection(DRIVER={MySQL ODBC 3.51 Driver};+SERVER=localhost;+DATABASE=TdMio;+UID=root;+PASSWORD=rootpwd;);
			OdbcConnection conn = new OdbcConnection (DRIVER=MySQL;SERVER=localhost;DATABASE=tdmio;UID=root;PASSWORD=rootpwd;);
			OdbcDataReader dbReader = null;
			conn.Open();
			OdbcCommand cmd = conn.CreateCommand();
			cmd.CommandText = Select  CodiceProblema from problemi where Data='+DataOdierna+'; 
			dbReader = cmd.ExecuteReader();
			while(dbReader.Read())
			{
problema =(string)dbReader[CodiceProblema];
			}
			dbReader.Close();
			conn.Close();

			return problema;
		}

		[WebMethod (EnableSession=true)]
		public string LogIn(string UserIdInput, string PasswordInput)
		{
			//OdbcConnection conn = new OdbcConnection(DRIVER={MySQL ODBC 3.51 Driver};+SERVER=localhost;+DATABASE=TdMio;+UID=root;+PASSWORD=rootpwd;);
			OdbcConnection conn = new OdbcConnection (DRIVER=MySQL;SERVER=localhost;DATABASE=tdmio;UID=root;PASSWORD=rootpwd;);
			OdbcDataReader dbReader = null;
			conn.Open();
			OdbcCommand cmd = conn.CreateCommand();
			cmd.CommandText = Select * from utenti where UserID='+UserIdInput+' and Password='+PasswordInput+'; 
			dbReader = cmd.ExecuteReader();
			if(dbReader.Read())
			{	
string Gruppo = (string)dbReader[Gruppo];
string Utente = (string)dbReader[CodiceUtente];
Session.Add(Utente,Utente);
Session.Add(Gruppo,Gruppo);
dbReader.Close();
conn.Close();	
return (string)Session[Gruppo]; 
			}
			else
			{	
dbReader.Close();
conn.Close();	
return Errore;		
			}			
		}
		/*##*/
		
		[WebMethod (EnableSession=true)]
		public void LogOut()
		{	
			Session.RemoveAll();
		}
		/*##*/
		
		[WebMethod (EnableSession=true)]
		public string NuovaSessione()
		{			
			string problema = CatchProblema();
			int massimo=0;
			//Se l'utente �stato indentificato ed �un pianificatore allora pu�aprire una nuova sessione
			if ((Session[Utente]!= null)((string)Session[Gruppo]==G1))
			{	
//controllo che l'utente non abbia gi�una sessione attiva
//OdbcConnection conn = new OdbcConnection(DRIVER={MySQL ODBC 3.51 Driver};+SERVER=localhost;+DATABASE=tdmio;+UID=root;+PASSWORD=rootpwd;);
OdbcConnection conn = new OdbcConnection (DRIVER=MySQL;SERVER=localhost;DATABASE=tdmio;UID=root;PASSWORD=rootpwd;);
OdbcDataReader dbReader = null;
conn.Open();
OdbcCommand cmd = conn.CreateCommand();
cmd.CommandText = Select * from sessione where Utente ='+(string)Session[Utente]+'and Stato='Attiva';
dbReader = cmd.ExecuteReader();
if(dbReader.Read())
{
	//si allora comunico l'errore perch�non possono essere contemporaneamente attive 2 sessioni
	string stringa=l'utente +(string)Session[Utente]+ ha gi�una sessione attiva, non �possibile aprirne altre!;
	dbReader.Close();
	conn.Close();
	return stringa;
}
else
{
	//no allora apro una nuova sessione
	dbReader.Close();
	conn.Close();
	OdbcConnection con =null;
	OdbcConnection connessione=null; 
	//con = new OdbcConnection(DRIVER={MySQL ODBC 3.51 Driver};+SERVER=localhost;+DATABASE=tdmio;+UID=root;+PASSWORD=rootpwd;);
	con = new OdbcConnection (DRIVER=MySQL;SERVER=localhost;DATABASE=tdmio;UID=root;PASSWORD=rootpwd;);
	con.Open();
	OdbcCommand command = con.CreateCommand();
	OdbcCommand commandSessione = con.CreateCommand();
	

[Mono-list] Problem with asp.net web application

2004-08-23 Thread beniniva
Hi,
I've an asp.net web application that shows, through an odbc connection to a
mysql database, the content of the table chosen from a DropDownList.

The code go well on windows but on linux with mono 1.01 not all the tables are
shown correctly.

Could anybody help me?

web application : WebForm1VisuaTabelle.aspx, WebForm1.VisuaTabelle.aspx.cs
dump db mysql : tdmio.txt


thanks,

Valentina.# MySQL-Front Dump 2.5
#
# Host: localhost   Database: tdmio
# 
# Server version 4.1.3b-beta-nt


#
# Table structure for table 'gruppi'
#

DROP TABLE IF EXISTS `gruppi`;
CREATE TABLE `gruppi` (
  `CodiceGruppo` varchar(4) NOT NULL default '0',
  `Nome` varchar(15) default 'Null',
  `Descrizione` varchar(25) default 'Null',
  PRIMARY KEY  (`CodiceGruppo`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



#
# Dumping data for table 'gruppi'
#

INSERT INTO `gruppi` (`CodiceGruppo`, `Nome`, `Descrizione`) VALUES(G1, 
Pianificatori, Utenti Pianificatori);
INSERT INTO `gruppi` (`CodiceGruppo`, `Nome`, `Descrizione`) VALUES(G2, Altri, 
Altri utenti);
INSERT INTO `gruppi` (`CodiceGruppo`, `Nome`, `Descrizione`) VALUES(G3, 
Amministrativi, Addetti Amministrazione);


#
# Table structure for table 'ordini'
#

DROP TABLE IF EXISTS `ordini`;
CREATE TABLE `ordini` (
  `Problema` char(4) NOT NULL default '0',
  `CodiceOrdine` int(4) NOT NULL default '0',
  `CurSessione` int(4) default '0',
  `Data` date default NULL,
  PRIMARY KEY  (`CodiceOrdine`,`Problema`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



#
# Dumping data for table 'ordini'
#

INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES(1, 
1, 0, -00-00);
INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES(1, 
2, 0, -00-00);
INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES(1, 
3, 11, -00-00);
INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES(1, 
4, 11, 2004-07-29);
INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES(1, 
5, 11, 2004-07-31);
INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES(1, 
6, 10, 2004-08-05);
INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES(1, 
7, 10, 2004-07-28);
INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES(1, 
8, 0, 2004-07-29);
INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES(1, 
9, 0, 2004-08-05);
INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES(1, 
10, 0, 2004-08-05);
INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES(1, 
11, 0, 2004-07-30);
INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES(1, 
12, 0, 2004-08-10);
INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES(1, 
13, 0, 2004-08-14);
INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES(1, 
14, 0, 2004-08-16);
INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES(1, 
15, 0, 2004-08-07);


#
# Table structure for table 'problemi'
#

DROP TABLE IF EXISTS `problemi`;
CREATE TABLE `problemi` (
  `CodiceProblema` varchar(4) NOT NULL default '0',
  `Nome` varchar(10) default 'Null',
  `Data` date default NULL,
  PRIMARY KEY  (`CodiceProblema`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



#
# Dumping data for table 'problemi'
#

INSERT INTO `problemi` (`CodiceProblema`, `Nome`, `Data`) VALUES(1, Problema1, 
2004-08-17);
INSERT INTO `problemi` (`CodiceProblema`, `Nome`, `Data`) VALUES(2, Problema2, 
2004-08-09);
INSERT INTO `problemi` (`CodiceProblema`, `Nome`, `Data`) VALUES(3, Problema3, 
2004-08-07);
INSERT INTO `problemi` (`CodiceProblema`, `Nome`, `Data`) VALUES(4, Problema4, 
2004-08-08);
INSERT INTO `problemi` (`CodiceProblema`, `Nome`, `Data`) VALUES(5, Problema5, 
2004-08-10);


#
# Table structure for table 'sequenze'
#

DROP TABLE IF EXISTS `sequenze`;
CREATE TABLE `sequenze` (
  `CodiceViaggio` int(5) NOT NULL default '0',
  `Problema` char(4) NOT NULL default '0',
  `Sequenza` char(4) NOT NULL default 'Null',
  `ProblemaOrdine` char(4) default '0',
  `CodiceOrdine` char(4) NOT NULL default 'Nul',
  PRIMARY KEY  (`CodiceViaggio`,`Problema`,`Sequenza`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



#
# Dumping data for table 'sequenze'
#

INSERT INTO `sequenze` (`CodiceViaggio`, `Problema`, `Sequenza`, `ProblemaOrdine`, 
`CodiceOrdine`) VALUES(1, 1, Null, 0, 7);
INSERT INTO `sequenze` (`CodiceViaggio`, `Problema`, `Sequenza`, `ProblemaOrdine`, 
`CodiceOrdine`) VALUES(3, 1, Null, 0, 6);
INSERT INTO `sequenze` (`CodiceViaggio`, `Problema`, `Sequenza`, `ProblemaOrdine`, 
`CodiceOrdine`) VALUES(4, 1, Null, 0, 3);
INSERT INTO `sequenze` (`CodiceViaggio`, `Problema`, `Sequenza`, `ProblemaOrdine`, 
`CodiceOrdine`) VALUES(5, 1, Null, 0, 1);
INSERT INTO `sequenze` (`CodiceViaggio`, `Problema`, `Sequenza`, 

Re: [Mono-list] Problem with a web serivce method.

2004-08-23 Thread beniniva
Isql is an utility of unixODBC

---
[EMAIL PROTECTED] root]# isql tdmio root rootpwd
+---+
| Connected!|
|   |
| sql-statement |
| help [tablename]  |
| quit  |
|   |
+---+
SQL select * from sessione;
+---+-+---+-+---+
| CodiceSessione| Problema| Stato | Nome| Utente|
+---+-+---+-+---+
| 1 | 1   | chiusa| Null| U1|
| 2 | 1   | chiusa| Null| U1|
| 3 | 1   | chiusa| Null| U1|
| 4 | 1   | chiusa| Null| U4|
| 5 | 1   | chiusa| Null| U1|
| 6 | 1   | chiusa| Null| U4|
| 7 | 1   | chiusa| Null| U5|
| 8 | 1   | chiusa| Null| U4|
| 9 | 1   | chiusa| Null| U1|
| 10| 1   | chiusa| Null| U1|
| 11| 1   | chiusa| Null| U1|
| 12| 1   | Attiva| Null| U1|
+---+-+---+-+---+
SQLRowCount returns 12
12 rows fetched

SQL  select * from sessione where Utente = 'U1' and Stato='Attiva';
+---+-+---+-+---+
| CodiceSessione| Problema| Stato | Nome| Utente|
+---+-+---+-+---+
| 12| 1   | Attiva| Null| U1|
+---+-+---+-+---+
SQLRowCount returns 1
1 rows fetched
SQL
--

In the code the value of Utente is passed by a session var
(string)Session[Utente] but the query is the same.


Valentina.

Scrive Jonathan Stowe [EMAIL PROTECTED]:

 On Mon, 2004-08-23 at 13:43, [EMAIL PROTECTED] wrote:
 
  
  The remote server returned an error: (500) Internal Server Error.
  Unable to retreive error information from ODBC driver manager
  
  What it means?
  
 
 There is a problem with your ODBC configuration, can you make a small
 console example that just attempts to do the same connection to the
 database?
 
 /J\
 
 



___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Problem with mod_mono1.01

2004-08-19 Thread beniniva
Hi,
I've installed packages of the 1.01 version for fedora core 2 and the Apache
Mono module mod_mono-1.0.1.tar.gz...it seems with non problem:

---
[EMAIL PROTECTED] root]# mono /usr/bin/mod-mono-server.exe --root
/usr/share/doc/xsp/test/ --applications /mono:/usr/share/doc/xsp/test/
--nonstop
mod-mono-server
Adding applications '/mono:/usr/share/doc/xsp/test/'...
Registering application:
Host:  any
Port:  any
Virtual path:  /mono/
Physical path: /usr/share/doc/xsp/test
Listening on: /tmp/mod_mono_server
Root directory: /usr/share/doc/xsp/test
---


Then I have configured the httpd.config file as explained in the install file of
mod_mono but when I start Apache with command apchectl start I get this
error:

[EMAIL PROTECTED] root]# chmod 666 /tmp/mod_mono_server
[EMAIL PROTECTED] root]# chown .apache /tmp/mod_mono_server
[EMAIL PROTECTED] root]# chmod g+w /tmp/mod_mono_server
[EMAIL PROTECTED] root]# apachectl start
[Thu Aug 19 10:27:15 2004] [warn] module mono_module is already loaded,
skipping
[Thu Aug 19 10:27:15 2004] [warn] module mono_module is already loaded,
skipping
Syntax error on line 6 of /etc/httpd/conf.d/auth_mysql.conf:
Cannot load /etc/httpd/modules/mod_auth_mysql.so into server: libmysqlclient.so.
10: cannot open shared object file: No such file or directory
---

This is the line 6 of /etc/httpd/conf.d/auth_mysql.conf:

1-#
2-# mod_auth_mysql can be used to limit access to documents by checking
3-# data in a MySQL database.
4-#
5-
6-LoadModule mysql_auth_module modules/mod_auth_mysql.so
7-
-


Why this error? 
With mod_mono 1.0 I had no problems.

What could I do to solve this?


Thanks,

Valentina.



___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] WebService, SessionState and CookieContainer

2004-07-27 Thread beniniva
I'm sorry,
I had not understood.

Thanks,
Valentina.


Scrive Lluis Sanchez [EMAIL PROTECTED]:

 Valentina:
 
 You already reported this bug and it has already been fixed. You only
 need to wait for the next Mono release or compile it yourself from CVS.
 There is no need to send this bug report over and over on all mono
 lists.
 
 Thanks,
 Lluis.
 

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] WebService, SessionState and CookieContainer

2004-07-26 Thread beniniva

 Hi,
I try to run a simple example of stateful web service. This example run well on
windows with Explorer but no on Mono with Apache, why?
 
In order to maintain stateful communication between a client application and a
server application,I use session objects and the cookie container.
On the Server I must explicitly enable session support for each Web service
method that requires a session state ( [WebMethod ( EnableSession = true )] )
On the Client application, I use cookie http with
System.Web.SessionState.HttpSessionState and System.Net.CookieContainer
classes.
When the web service method uses a session state, a cookie is passed back to the
Web Service client in the response header. That cookie uniquely identifies the
session for that Web Service client.
To receive that cookie for the web service client, a new instance of
CookieContainer must be created and then assigned to the CookieContainer
property before the Web service method is called. This make sure that the
cookie is correctly included in subsequent requests. I must do this because I
must store the cookies that are received in the session state for future
retrieval by the session.
The web services code is:Service1.asmx.cs

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
...
...
...
[ WebMethod(Description=Per session Hit Counter,EnableSession=true)]
  public int SessionHitCounter()  
  {
if (Session[HitCounter] == null)  
{
   Session[HitCounter] = 1;
}
else  
{
   Session[HitCounter] = ((int) Session[HitCounter]) + 1;
}
return ((int) Session[HitCounter]);
  }

 
The client application code is:WebForm1.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.Net;
.
.
  // Create a new instance of a proxy class for your XML Web service.
  private ServerUsage.Service1 su = new ServerUsage.Service1();
  private CookieContainer cookieJar;
..
  private void Button1_Click(object sender, System.EventArgs e)
  {
   
 
// Check to see if the cookies have already been saved for this session.
if (Session[CookieJar] == null)  
   cookieJar= new CookieContainer();
else
   cookieJar = (CookieContainer) Session[CookieJar];
 
// Assign the CookieContainer to the proxy class.
su.CookieContainer = cookieJar;
 
// Invoke an XML Web service method that uses session state and thus
cookies.
int count = su.SessionHitCounter();
 
// Store the cookies received in the session state for future retrieval by
this session.
Session[CookieJar] = cookieJar;
 
// Populate the text box with the results from the call to the XML Web
service method.
Label1.Text = count.ToString();  
   
 
  }


I've mono 1.0 installed. 

Where I mistake?

Could anybody help me, please?
 
Thanks a lot,
 
Valentina.

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Error runnig .aspx page

2004-07-22 Thread beniniva

Hi,
I try to run dbReader.aspx page but I obtein this error:
--
Server error in '/mono' application
Description: Error processing request.

Error Message: HTTP 500.

Stack Trace:

System.IndexOutOfRangeException: Array index is out of range.
in 0x000d5 System.Data.Odbc.OdbcDataReader:GetValue (int)
in 0x0005d (wrapper remoting-invoke-with-check)
System.Data.Odbc.OdbcDataReader:GetValue (int)
in 0x00012 System.Data.Odbc.OdbcDataReader:get_Item (int)
in 0x0005d (wrapper remoting-invoke-with-check)
System.Data.Odbc.OdbcDataReader:get_Item (int)
in 0x0016d dbReaderASP.WebForm1:Button1_Click (object,System.EventArgs)
in 0x0006a (wrapper delegate-invoke)
System.MulticastDelegate:invoke_void_object_EventArgs
(object,System.EventArgs)
in 0x00090 System.Web.UI.WebControls.Button:OnClick (System.EventArgs)
in 0x00058
System.Web.UI.WebControls.Button:System.Web.UI.IPostBackEventHandler.RaisePostBackEvent
(string)
in 0x00016 System.Web.UI.Page:RaisePostBackEvent
(System.Web.UI.IPostBackEventHandler,string)
in 0x0003a System.Web.UI.Page:RaisePostBackEvents ()
in 0x002ab System.Web.UI.Page:InternalProcessRequest ()
in 0x000c2 System.Web.UI.Page:ProcessRequest (System.Web.HttpContext)
in 0x002e8 ExecuteHandlerState:Execute ()
in 0x00084 StateMachine:ExecuteState
(System.Web.HttpApplication/IStateHandler,bool)
-

What could I do?
I think the c# code is correct becouse it runs on windows could it be a
problem of mono..?

I've mono 1 beta with fedora core 2.
Which version have you?
Do you obtain the same error?

Thanks,

Valentina.



WebForm1dbReader.aspx
Description: Binary data
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.Odbc;

namespace dbReaderASP
{
	/// summary
	/// Summary description for WebForm1.
	/// /summary
	public class WebForm1 : System.Web.UI.Page
	{
		protected System.Web.UI.WebControls.TextBox TextBox1;
		protected System.Web.UI.WebControls.Label Label1;
		protected System.Web.UI.WebControls.Button Button1;
		protected System.Web.UI.WebControls.Label Label3;
		protected System.Web.UI.WebControls.Label Label2;
	
		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.Button1.Click += new System.EventHandler(this.Button1_Click);
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion

		private void Button1_Click(object sender, System.EventArgs e)
		{
			Label3.Text=;
			Session.Add(Login, TextBox1.Text);
			object LoginIns = Session[Login];
			//OdbcConnection conn = new OdbcConnection(DRIVER={MySQL ODBC 3.51 Driver};+SERVER=localhost;+DATABASE=Login;+UID=root;+PASSWORD=rootpwd;);
			OdbcConnection conn = new OdbcConnection(DRIVER=MySQL;SERVER=localhost;DATABASE=login;UID=root;PASSWORD=rootpwd;);
			OdbcDataReader dbReader = null;
			conn.Open();
			OdbcCommand cmd = conn.CreateCommand();
			cmd.CommandText = Select RuoloAziendale from login where Login='+ LoginIns +'; 
			dbReader = cmd.ExecuteReader();
			if (dbReader.Read())
			{	
//Label3.Text=((string)dbReader[RuoloAziendale]);
//Label3.Text=dbReader[RuoloAziendale].ToString();
Label3.Text=dbReader[2].ToString();
			}
			else
			{
Label3.Text=(login errata!);
			}
			Session.RemoveAll();
			dbReader.Close();
			conn.Close();

		}

	}
}


[Mono-list] Implemented classes

2004-07-21 Thread beniniva

Hi,
I would like to know if the assemblies below are implemented, becouse I try to
run 
code (that run with no problem on windows) but I obtein always the same error
message Object reference not set to an instance of an object.

What it means?

Where I mistake?

Classes:
--System.Web.SessionState.HttpSessionState (to use session variables with web
services)
--System.Net (to use CookieContainer)
--System.Web.Services.Protocols (to use SoapHeader)


Thank,

Valentina.

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Error in web service method.

2004-07-20 Thread beniniva
Hi,
when I try to test the web service LoginService.asmx
(http://localhost/mono/LoginService.asmx), the method Login and LogOut go
well, instead TestLogin give me only this message:
-
The remote server returned an error: (500) Internal Server Error.
Object reference not set to an instance of an object
--


If I try to test a client application (WebForm1LoginClient.aspx) that invoke
the
method Loginof the LoginService.asmx I get this error:

Server error in '/mono' application
Description: Error processing request.

Error Message: HTTP 500.

Stack Trace:

System.Web.Services.Protocols.SoapException: Object reference not set to an
instance of an object
in 0x00528
System.Web.Services.Protocols.SoapHttpClientProtocol:ReceiveResponse
(System.Net.WebResponse,System.Web.Services.Protocols.SoapClientMessage,System.Web.Services.Protocols.SoapExtension[])
in 0x00080 (wrapper remoting-invoke-with-check)
System.Web.Services.Protocols.SoapHttpClientProtocol:ReceiveResponse
(System.Net.WebResponse,System.Web.Services.Protocols.SoapClientMessage,System.Web.Services.Protocols.SoapExtension[])
in 0x002a4 System.Web.Services.Protocols.SoapHttpClientProtocol:Invoke
(string,object[])
in 0x0006f (wrapper remoting-invoke-with-check)
System.Web.Services.Protocols.SoapHttpClientProtocol:Invoke (string,object[])
in 0x00037 localhost.LoginService:TestLogin ()
in 0x0019d LoginClient.WebForm1:ButtonLogin_Click (object,System.EventArgs)
in 0x0006a (wrapper delegate-invoke)
System.MulticastDelegate:invoke_void_object_EventArgs
(object,System.EventArgs)
in 0x00090 System.Web.UI.WebControls.Button:OnClick (System.EventArgs)
in 0x00058
System.Web.UI.WebControls.Button:System.Web.UI.IPostBackEventHandler.RaisePostBackEvent
(string)
in 0x00016 System.Web.UI.Page:RaisePostBackEvent
(System.Web.UI.IPostBackEventHandler,string)
in 0x0003a System.Web.UI.Page:RaisePostBackEvents ()
in 0x002ab System.Web.UI.Page:InternalProcessRequest ()
in 0x000c2 System.Web.UI.Page:ProcessRequest (System.Web.HttpContext)
in 0x002e8 ExecuteHandlerState:Execute ()
in 0x00084 StateMachine:ExecuteState
(System.Web.HttpApplication/IStateHandler,bool)



How to work with SessionState,(System.Web.SessionState) and System.Net?


Thanks,

Valentina.


Scrive Tom Larsen [EMAIL PROTECTED]:

 
 Exceptions are marshalled across application domains.  What is the the
 exception type, Exception.Message, Exception.StackTrace?
 
 Tom Larsen
 
 On Mon, 19 Jul 2004 [EMAIL PROTECTED] wrote:
 
 
 
  Please help me!
 
  This example of Web Service run with success on Windows with VisualStudio
 and
  IIS, but when I try to run on Linux (FC2) with Mono (Beta1),I get this
 error :
  The remote server returned an error: (500) Internal Server Error.
  Object reference not set to an instance of an object
 
 
  The method that gives problem is TestLogin..Why? Which is the correct
  solution?
 
  WebService code is :LoginService.asmx.cs
 
 
  Thanks,
 
  Valentina.
 


using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
using System.Data.Odbc;

namespace LoginService
{
	public class LoginService : System.Web.Services.WebService
	{
		public LoginService()
		{
			InitializeComponent();
		}

		#region Component Designer generated code
		
		//Required by the Web Services Designer 
		private IContainer components = null;

		/// summary
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// /summary
		private void InitializeComponent()
		{
		}

		/// summary
		/// Clean up any resources being used.
		/// /summary
		protected override void Dispose( bool disposing )
		{
			if(disposing  components != null)
			{
components.Dispose();
			}
			base.Dispose(disposing);		
		}
		
		#endregion
		//##
		//LOGIN
		//Metodo per il login dell'utente
		[WebMethod (EnableSession=true)]		
		public bool Login( string LoginInserita, string PasswordInserita)
		{
			//connessione odbc al database mysql
			//su windows
			//OdbcConnection conn = new OdbcConnection(DRIVER={MySQL ODBC 3.51 Driver};+SERVER=localhost;+DATABASE=Login;+UID=root;+PASSWORD=rootpwd;);
			//su linux
			OdbcConnection conn = new OdbcConnection(DRIVER=MySQL;SERVER=localhost;DATABASE=login;UID=root;PASSWORD=rootpwd;);
			OdbcDataReader dbReader = null;
			conn.Open();
			OdbcCommand cmd = conn.CreateCommand();
			//controllo se la login e la password inserite dall'utente corrispondono ai dati mantenuti nel database login
			cmd.CommandText = Select * from Login where Login='+ LoginInserita+' and Password='+PasswordInserita+'; 
			dbReader = cmd.ExecuteReader();
			//se si mantengo la login dell'utente in una variabile di sessione ed il metodo torna true
			if(dbReader.Read())
	

Re: [Mono-list] Error in web service method.

2004-07-20 Thread beniniva
Hi,
the C# sintax is correct, on windows it works well.
Maybe the problem is in SessionState Object, I dont' know

Can anybody help me?

thanks,

Valentina.

Scrive Tizio Incognito [EMAIL PROTECTED]:

 [EMAIL PROTECTED] said the following on 20/07/2004 10.52:
 
 Hi,
 when I try to test the web service LoginService.asmx
 (http://localhost/mono/LoginService.asmx), the method Login and LogOut
 go
 well, instead TestLogin give me only this message:
 -
 The remote server returned an error: (500) Internal Server Error.
 Object reference not set to an instance of an object
 --
 
   
 
 [SNIP]
 
  //TEST LOGIN
  //Metodo che verifica il contenuto della variabile di Sessione Login
  [WebMethod (EnableSession=true)]
  public string TestLogin ()
  {
  //se la variabile di sessione non è vuota, significa che 
  l'utente si è
 logato, quindi recupero alcuni dati su di lui, ad esempio il ruolo
 aziendale
  if ((string)Session[Login]!= null)
   
 
 Ciao Valentina,
 
 I don't know exactly how it works with C#, but I think you may check if 
 Session[Login] is *nothing* instead of null (however, this is how it 
 works with VB)
 
 --
 T.I.
 
 ___
 Mono-list maillist  -  [EMAIL PROTECTED]
 http://lists.ximian.com/mailman/listinfo/mono-list
 



___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] WebService, SessionState and CookieContainer.

2004-07-20 Thread beniniva
I've posted the problem on http://bugzilla.ximian.com, Bug 61762 posted.
I hope that it goes well,

Valentina.

Scrive Gonzalo Paniagua Javier [EMAIL PROTECTED]:

 El vie, 16-07-2004 a las 10:48, [EMAIL PROTECTED] escribió:
  Sorry,
  
  Web services code is: Service1.asmx.cs
  client application code is:WebForm1.aspx.cs
 
 Could you attach your files and add a description on how to reproduce
 your problem in http://bugzilla.ximian.com?
 
 Thanks.
 
 -Gonzalo
 
 
 ___
 Mono-list maillist  -  [EMAIL PROTECTED]
 http://lists.ximian.com/mailman/listinfo/mono-list
 



___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Error in web service method.

2004-07-19 Thread beniniva


Please help me!

This example of Web Service run with success on Windows with VisualStudio and
IIS, but when I try to run on Linux (FC2) with Mono (Beta1),I get this error :
The remote server returned an error: (500) Internal Server Error.
Object reference not set to an instance of an object


The method that gives problem is TestLogin..Why? Which is the correct
solution?

WebService code is :LoginService.asmx.cs


Thanks,

Valentina.using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
using System.Data.Odbc;

namespace LoginService
{
	/// summary
	/// Summary description for Service1.
	/// /summary
	public class LoginService : System.Web.Services.WebService
	{
		public LoginService()
		{
			//CODEGEN: This call is required by the ASP.NET Web Services Designer
			InitializeComponent();
		}

		#region Component Designer generated code
		
		//Required by the Web Services Designer 
		private IContainer components = null;

		/// summary
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// /summary
		private void InitializeComponent()
		{
		}

		/// summary
		/// Clean up any resources being used.
		/// /summary
		protected override void Dispose( bool disposing )
		{
			if(disposing  components != null)
			{
components.Dispose();
			}
			base.Dispose(disposing);		
		}
		
		#endregion
		//##
		//LOGIN
		[WebMethod (EnableSession=true)]		
		public bool Login( string LoginInserita, string PasswordInserita)
		{
			OdbcConnection conn = new OdbcConnection(DRIVER=MySQL;SERVER=localhost;DATABASE=login;UID=root;PASSWORD=rootpwd;);
			OdbcDataReader dbReader = null;
			conn.Open();
			OdbcCommand cmd = conn.CreateCommand();
			cmd.CommandText = Select * from login where Login='+ LoginInserita+' and Password='+PasswordInserita+'; 
			dbReader = cmd.ExecuteReader();
			if(dbReader.Read())
			{	
Session.Add(Login, LoginInserita);
dbReader.Close();
conn.Close();
return	true;
			}
			else
			{	
dbReader.Close();
conn.Close();
return false;
			}		
		}
		//##
		//TEST LOGIN
		[WebMethod (EnableSession=true)]
		public string TestLogin ()
		{
			if ((string)Session[Login]!= null)
			{
//return (string)Session[Login];
OdbcConnection conn = new OdbcConnection(DRIVER=MySQL;SERVER=localhost;DATABASE=login;UID=root;PASSWORD=rootpwd;);
OdbcDataReader dbReader = null;
conn.Open();
OdbcCommand cmd = conn.CreateCommand();
cmd.CommandText = Select RuoloAziendale from login where Login ='+(string)Session[Login]+';
dbReader = cmd.ExecuteReader();
if(dbReader.Read())
{
	Session.Add(Ruolo,(string)dbReader[RuoloAziendale] );			
	dbReader.Close();
	conn.Close();
}
return (string)Session[Ruolo];
			}
			else
			{
return need to login;
			}
		}		
		//##
		//LOGOUT
		[WebMethod (EnableSession=true)]
		public bool Logout()
		{
			Session.RemoveAll();
			return false;
		}
	}
}


Re: [Mono-list] WebService, SessionState and CookieContainer.

2004-07-16 Thread beniniva
Sorry,

Web services code is: Service1.asmx.cs
client application code is:WebForm1.aspx.cs

Valentina.

Scrive Jonathan Stowe [EMAIL PROTECTED]:

 On Fri, 2004-07-16 at 09:14, [EMAIL PROTECTED] wrote:
 snip
  The Web services code is: Contatore.asmx.cs
  The client application code is: CounterCLI.aspx.cs
  
  Could anybody help me please?
 
 Your attachments appear to be formatted formatted as RTF please could
 you send them again.
 
 /J\
 
 


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.Net;

namespace CounterCLI
{
/// summary
/// Summary description for WebForm1.
/// /summary
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.Button Button1;

// Create a new instance of a proxy class for your XML Web service.
private ServerUsage.Service1 su = new ServerUsage.Service1();
private CookieContainer cookieJar;


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.Button1.Click += new 
System.EventHandler(this.Button1_Click);
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

private void Button1_Click(object sender, System.EventArgs e)
{


// Check to see if the cookies have already been saved for 
this session.
if (Session[CookieJar] == null) 
cookieJar= new CookieContainer();
else
cookieJar = (CookieContainer) Session[CookieJar];

// Assign the CookieContainer to the proxy class.
su.CookieContainer = cookieJar;

// Invoke an XML Web service method that uses session state 
and thus cookies.
int count = su.SessionHitCounter(); 

// Store the cookies received in the session state for future 
retrieval by this session.
Session[CookieJar] = cookieJar;

// Populate the text box with the results from the call to the 
XML Web service method.
Label1.Text = count.ToString();  


}
}
}
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;

namespace Contatore
{
/// summary
/// Summary description for Service1.
/// /summary
public class Service1 : System.Web.Services.WebService
{
public Service1()
{
//CODEGEN: This call is required by the ASP.NET Web Services 
Designer
InitializeComponent();
}

#region Component Designer generated code

//Required by the Web Services Designer 
private IContainer components = null;

/// summary
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// /summary
private void InitializeComponent()
{
}

/// summary
/// Clean up any resources being used.
/// /summary
protected override void Dispose( bool disposing )
{
if(disposing  components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}

[Mono-list] WebServices and Mono

2004-07-14 Thread beniniva
Hi,
I'm new in Mono and WebServices technology.
Could anybody write me a simple web service cliente example (web application) of
TestService.asmx (in /usr/share/doc/xsp/test).

TestService.asmx
-
%@ WebService Language=c# Codebehind=TestService.asmx.cs
Class=WebServiceTests.TestService %
 
using System;
using System.Web.Services;
using System.Web.Services.Protocols;
 
namespace WebServiceTests
{
 public class TestService : System.Web.Services.WebService
 {
  [WebMethod]
  public string Echo (string a)
  {
   return a;
  }
  [WebMethod]
  public int Add (int a, int b)
  {
   return a + b;
  }
 }
}
---
 
And...Which are the steps for creating and compiling the proxy class?
 
Thanks a lot,
 
vale.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Problem with libmod_mono.so

2004-07-02 Thread beniniva

Thank you very much!

I've just installed httpd-devel-2.0.49-4 instead of apache-devel-1.3.31.

But now I've another problem when I lunch apachectl start:

**
[EMAIL PROTECTED] root]# mono /usr/bin/mod-mono-server.exe --root
/usr/share/doc/xsp/test/ --applications /mono:/usr/share/doc/xsp/test/
--nonstop
Adding applications '/mono:/usr/share/doc/xsp/test/'...
Registering application:
Host:  any
Port:  any
Virtual path:  /mono/
Physical path: /usr/share/doc/xsp/test
Listening on: /tmp/mod_mono_server
Root directory: /usr/share/doc/xsp/test
*
[EMAIL PROTECTED] root]# apachectl start
[Fri Jul 02 10:22:08 2004] [warn] module mono_module is already loaded,
skipping[Fri Jul 02 10:22:08 2004] [warn] module mono_module is already loaded,
skippingSyntax error on line 545 of /etc/httpd/conf/httpd.conf:
Invalid command 'MonoApplication', perhaps mis-spelled or defined by a module
not included in the server configuration
***

This is line 545 of /etc/httpd/conf/httpd.conf:

MonoApplication /mono:/usr/share/doc/xsp/test


What can I do?

Thanks,

Valentina.



Scrive Jonathan Stowe [EMAIL PROTECTED]:

 On Thu, 2004-07-01 at 14:27, [EMAIL PROTECTED] wrote:
  I've created the folder apache in /usr/local/ and then I've installed
  mod_mono-0.11 with successfully.
  
  Now I've problems with apache:
  
  [EMAIL PROTECTED] root]# apachectl start
  Syntax error on line 201 of /etc/httpd/conf/httpd.conf:
  Cannot load /usr/lib/httpd/modules/libmod_mono.so into server:
  /usr/lib/httpd/modules/libmod_mono.so: undefined symbol: ap_table_get
  
  
 
 This looks very much that you are trying to load a module which was
 compiled against a different version apache into your apache - you may
 have to specify the location of your apache installation to configure
 'configure --help' will give you the flags to set this.
 
 /J\
 
 



___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Problem with libmod_mono.so

2004-07-02 Thread beniniva
Sorry,
I'm very stupid!
I've forgot the 's'

MonoApplications /mono:/usr/share/doc/xsp/test it goes well!!!

Thanks to all,

Valentina.



Scrive [EMAIL PROTECTED]:

 
 Thank you very much!
 
 I've just installed httpd-devel-2.0.49-4 instead of apache-devel-1.3.31.
 
 But now I've another problem when I lunch apachectl start:
 
 **
 [EMAIL PROTECTED] root]# mono /usr/bin/mod-mono-server.exe --root
 /usr/share/doc/xsp/test/ --applications /mono:/usr/share/doc/xsp/test/
 --nonstop
 Adding applications '/mono:/usr/share/doc/xsp/test/'...
 Registering application:
 Host:  any
 Port:  any
 Virtual path:  /mono/
 Physical path: /usr/share/doc/xsp/test
 Listening on: /tmp/mod_mono_server
 Root directory: /usr/share/doc/xsp/test
 *
 [EMAIL PROTECTED] root]# apachectl start
 [Fri Jul 02 10:22:08 2004] [warn] module mono_module is already loaded,
 skipping[Fri Jul 02 10:22:08 2004] [warn] module mono_module is already
 loaded,
 skippingSyntax error on line 545 of /etc/httpd/conf/httpd.conf:
 Invalid command 'MonoApplication', perhaps mis-spelled or defined by a
 module
 not included in the server configuration
 ***
 
 This is line 545 of /etc/httpd/conf/httpd.conf:
 
 MonoApplication /mono:/usr/share/doc/xsp/test
 
 
 What can I do?
 
 Thanks,
 
 Valentina.
 
 
 
 Scrive Jonathan Stowe [EMAIL PROTECTED]:
 
  On Thu, 2004-07-01 at 14:27, [EMAIL PROTECTED] wrote:
   I've created the folder apache in /usr/local/ and then I've installed
   mod_mono-0.11 with successfully.
   
   Now I've problems with apache:
   
   [EMAIL PROTECTED] root]# apachectl start
   Syntax error on line 201 of /etc/httpd/conf/httpd.conf:
   Cannot load /usr/lib/httpd/modules/libmod_mono.so into server:
   /usr/lib/httpd/modules/libmod_mono.so: undefined symbol: ap_table_get
   
   
  
  This looks very much that you are trying to load a module which was
  compiled against a different version apache into your apache - you may
  have to specify the location of your apache installation to configure
  'configure --help' will give you the flags to set this.
  
  /J\
  
  
 
 
 
 ___
 Mono-list maillist  -  [EMAIL PROTECTED]
 http://lists.ximian.com/mailman/listinfo/mono-list
 



___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Problem with libmod_mono.so

2004-07-01 Thread beniniva
Hi Brent,
thanks for your reply.
I've downloaded apache-devel package and I've installed that.
So I've compiled with no problem mod_mono-0.11, but I've new problem installing
that:

[EMAIL PROTECTED] mod_mono-0.11]# make install
Making install in src
make[1]: Entering directory `/root/Desktop/Download/Beta3FC2/mod_mono-0.11/src'
/usr/sbin/apxs -i -a -n mono .libs/libmod_mono.so
[activating module `mono' in /etc/httpd/conf/httpd.conf]
cp .libs/libmod_mono.so /usr/lib/apache/libmod_mono.so
cp: impossibile creare il file normale `/usr/lib/apache/libmod_mono.so': No such
file or directory
apxs:Break: Command failed with rc=1
make[1]: *** [install] Error 1
make[1]: Leaving directory `/root/Desktop/Download/Beta3FC2/mod_mono-0.11/src'
make: *** [install-recursive] Error 1

Any ideas?


Thanks,

Valentina.

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Problem with libmod_mono.so

2004-06-30 Thread beniniva
Hi,

I've Fedora Core 2 and Mono Beta3. I've downloaded all the rpm packages
availability on http://www.go-mono.com/download.html.
I've been trying to get Asp.Net and Apache to work together whit mod-mono but
I've some problems.
 
Apache config file:
 
AddType application/x-asp-net .aspx .ashx .asmx .ascx .asax .config
LoadModule mod_module /usr/lib/httpd/modules/libmod_mono.so
MonoUnixSocket /tmp/mod_mono_server
Alias /mono /usr/share/doc/xsp/test
 
This is the error I got when I lunch apachectl start:
 
Syntax error on line 201 of /etc/httpd/conf/httpd.conf:
Cannot load /usr/lib/httpd/modules/libmod_mono.so into server:
/usr/lib/httpd/modules/libmod_mono.so: cannot open shared object file: No such
file or directory
 
 
Why I've not libmod_mono.so?
 
 
I also try to install mod_mono-0.11.tar.gz but..
 
[EMAIL PROTECTED] mod_mono-0.11]# ./configure --prefix=/usr
.
.
creating libtool
checking if building mod_mono_old is requested... no
checking for --with-apxs... no
checking for --with-apr-config... not specified
checking for apxs2 in /usr/local/apache/sbin... no
checking for apxs in /usr/local/apache/sbin... no
checking for apr-config in /usr/local/apache/sbin... no
checking for apxs2 in /usr/local/apache2/bin... no
checking for apxs in /usr/local/apache2/bin... no
checking for apr-config in /usr/local/apache2/bin... no
checking for apxs2 in /usr/sbin... no
checking for apxs in /usr/sbin... no
checking for apr-config in /usr/sbin... no
checking for apxs2... no
checking for apxs... no
configure: error:  apxs was not found, DSO compilation will not be
available
 
 
Could anybody help me?
 
Thanks,
 
Valentina.

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Problem with MySQL Data Provider (ByteFx)

2004-06-29 Thread beniniva
Hi,

I've just installed Mono Beta 3...but I've still problems:

##
[EMAIL PROTECTED] mono]# mcs provaByteFX.cs -r System.Data.dll -r ByteFX.Data.dll
Compilation succeeded
[EMAIL PROTECTED] mono]# mono provaByteFX.exe


Unhandled Exception: ByteFX.Data.MySqlClient.MySqlException: Host
'localhost.localdomain' is not allowed to connect to this MySQL server
in 0x000d5 ByteFX.Data.MySqlClient.Driver:ReadPacket ()
in 0x00198 ByteFX.Data.MySqlClient.Driver:Open
(ByteFX.Data.MySqlClient.MySqlConnectionString)
in 0x0003c ByteFX.Data.MySqlClient.MySqlInternalConnection:Open ()
in 0x000ef ByteFX.Data.MySqlClient.MySqlPool:CreateNewPooledConnection ()
in 0x0021d ByteFX.Data.MySqlClient.MySqlPool:GetPooledConnection ()
in 0x00053 ByteFX.Data.MySqlClient.MySqlPool:GetConnection ()
in 0x00112 ByteFX.Data.MySqlClient.MySqlPoolManager:GetConnection
(ByteFX.Data.MySqlClient.MySqlConnectionString)
in 0x0007c ByteFX.Data.MySqlClient.MySqlConnection:Open ()


##
And with sqlsharp:

SQL# \Provider MySql
The default Provider is LOADEXTPROVIDER
  Assembly: Mono.Data.MySql
  Connection Class: Mono.Data.MySql.MySqlConnection
 
SQL# \Provider MySqlNet
The default Provider is LOADEXTPROVIDER
  Assembly: ByteFX.Data
  Connection Class: ByteFX.Data.MySQLClient.MySQLConnection
 
SQL# \ConnectionString Server=localhost; Database=db1; UserID=root;
Password=rootpwd;
 
SQL# \Open
Attempt to open connection...
Loading external provider...
Error: unable to load the assembly of the provider: ByteFX.Data : File
'ByteFX.Data' not found.


Any ideas?
thanks,
Valentina.


Scrive Artur Brodowski [EMAIL PROTECTED]:

 W li¶cie z pon, 28-06-2004, godz. 15:31, [EMAIL PROTECTED] pisze: 
  I've mono 1 Beta with Fedora Core 2.
  I try to test a connection string with MySQL Data Provider (ByteFx),
 compilation
  is all right but running failed:
 
 Install latest Mono release (RC has some issues, try Beta 3) -
 ByteFX.Data.dll version shoul be 0.7.6.1. Earlier versions of 
 the libary were broken due to namespace changes.
 
 artb.
 -- 
 only so many songs can be sung with two lips two lungs and one tongue
 
 



___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


RE: [Mono-list] Odbc connection via UnixODBC

2004-06-28 Thread beniniva
Hi,

thanks for your reply.
I've created a symbolic link such as you suggest (ln -s libodbc.so odbc32.so),
but I obtain the same error.

Unhandled Exception: System.DllNotFoundException: odbc32
in 0x00053 (wrapper managed-to-native)
System.Data.Odbc.libodbc:SQLAllocHandle
(System.Data.Odbc.OdbcHandleType,intptr,intptr)
in 0x0003f System.Data.Odbc.OdbcConnection:.ctor ()
in 0xa System.Data.Odbc.OdbcConnection:.ctor (string)
in 0x00056 (wrapper remoting-invoke-with-check)
System.Data.Odbc.OdbcConnection:.ctor (string)
in 0x0002d Prova.Class1:Main (string[])


Where I'm mistaking?

Thanks,

Valentina
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Problem with MySQL Data Provider (ByteFx)

2004-06-28 Thread beniniva
Hi,
I've mono 1 Beta with Fedora Core 2.
I try to test a connection string with MySQL Data Provider (ByteFx), compilation
is all right but running failed:

##
[EMAIL PROTECTED] mono]# mcs EsempioByteFX.cs -r System.Data.dll -r ByteFX.Data.dll
Compilation succeeded
[EMAIL PROTECTED] mono]# mono EsempioByteFX.exe
 
Unhandled Exception: System.NullReferenceException: A null value was found where
 an object instance was required.
in 0x0025a ByteFX.Data.MySqlClient.MySqlStream:get_DataAvailable ()
in 0x00051 ByteFX.Data.Common.MultiHostStream:Read (byte[],int,int)
in 0x0003d ByteFX.Data.MySqlClient.MySqlStream:ReadInt24 ()
in 0x00050 (wrapper remoting-invoke-with-check) ByteFX.Data.MySqlClient.MySqlS
tream:ReadInt24 ()
in 0x0005b ByteFX.Data.MySqlClient.Driver:ReadRawPacket ()
in 0x0004e ByteFX.Data.MySqlClient.Driver:ReadPacket ()
in 0x00094 ByteFX.Data.MySqlClient.Driver:Open (ByteFX.Data.MySqlClient.MySqlC
onnectionString)
in 0x0003c ByteFX.Data.MySqlClient.MySqlInternalConnection:Open ()
in 0x000ef ByteFX.Data.MySqlClient.MySqlPool:CreateNewPooledConnection ()
in 0x00212 ByteFX.Data.MySqlClient.MySqlPool:GetPooledConnection ()
in 0x00052 ByteFX.Data.MySqlClient.MySqlPool:GetConnection ()
in 0x00117 ByteFX.Data.MySqlClient.MySqlPoolManager:GetConnection (ByteFX.Data
.MySqlClient.MySqlConnectionString)
in 0x00077 ByteFX.Data.MySqlClient.MySqlConnection:Open ()
in 0x0004f (wrapper remoting-invoke-with-check) ByteFX.Data.MySqlClient.MySqlC
onnection:Open ()
in 0x00070 ConnessioneByteFX.Class1:Main (string[])
##


If I use Sqlsharp I obtein:

##
SQL# \Provider MySqlNet
The default Provider is LOADEXTPROVIDER
  Assembly: ByteFX.Data
  Connection Class: ByteFX.Data.MySQLClient.MySQLConnection
 
SQL# \ConnectionString Server=localhost; Database=db1; UserID=root; Password=roo
tpwd;
 
SQL# \Open
Attempt to open connection...
Loading external provider...
Error: unable to load the assembly of the provider: ByteFX.Data : File 'ByteFX.D
ata' not found.


I've checked ... /usr/lib/mono/1.0/ByteFX.Data.dll exist and also
/usr/lib/mono/2.0/ByteFX.Data.dll.


What can I do?

Thanks,

Valentina.



___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Odbc connection via UnixODBC

2004-06-23 Thread beniniva

I've an odbc connection test, named Test.cs,connecting to MySQL database with a
connection string  that works correctly on Windows XP using Visual Studio.Net
2003, but not on Linux (FedoraCore2) with Mono (1 Beta) via unixODBC.


[EMAIL PROTECTED] Desktop]# mcs Test.cs -r System.Data.dll
Compilation succeeded
[EMAIL PROTECTED] Desktop]# mono Test.exe
 
Unhandled Exception: System.DllNotFoundException: odbc32
in 0x00053 (wrapper managed-to-native) System.Data.Odbc.libodbc:SQLAllocHandle
(System.Data.Odbc.OdbcHandleType,intptr,intptr)
in 0x0003f System.Data.Odbc.OdbcConnection:.ctor ()
in 0xa System.Data.Odbc.OdbcConnection:.ctor (string)
in 0x00056 (wrapper remoting-invoke-with-check)
System.Data.Odbc.OdbcConnection:.ctor (string)
in 0x0002d Prova.Class1:Main (string[])



Could anybody help me?

Thanks in advance,

Valentina.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Red Carpet and Fedora Core2

2004-06-07 Thread beniniva

I've replace RedHat Fedora Core 1 with Fedora Core 2.
I would install Red Carpet but there isn't any packages for FC2 and the FC1
packages give me this error: 

/usr/lib/red-carpet/red_extra/__init__.py:2:RuntimeWarning: Python C API
version mistmatch for module xxx_red_extra:This Python has API version 1012,
module xxx_red_extra version 1011.
from xxx_red_extra import*

What can I do to get Red Carpet for FC2?

Thanks in advance.

Valentina.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Problem with Mono-Develop gtk-sharp-0.18.tar.gz

2004-05-05 Thread beniniva
I've downloaded mono packages required for MonoDevelop but when I try to run
make 
the compiler say: 
 
 
ditors.dll /r:System.Drawing /resource:./sample.glade 
error CS0006: Cannot find assembly `../../gnome/gnome-sharp.dll' 
Log: 
  
error CS0006: Cannot find assembly
`../../gconf/GConf.PropertyEditors/gconf-sharp-peditors.dll' 
Log: 
  
Compilation failed: 2 error(s), 0 warnings 
make[3]: *** [sample.exe] Error 1 
make[3]: Leaving directory
`/root/Desktop/DaInstallare/Mono_develop/gtk-sharp-0.18/sample/gconf' 
make[2]: *** [all-recursive] Error 1 
make[2]: Leaving directory
`/root/Desktop/DaInstallare/Mono_develop/gtk-sharp-0.18/sample' 
make[1]: *** [all-recursive] Error 1 
make[1]: Leaving directory
`/root/Desktop/DaInstallare/Mono_develop/gtk-sharp-0.18' 
make: *** [all] Error 2 
 
* 
What can I do ? 
 
Thanks, 
 
Vale
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Problem with Monodevelop gtk-sharp 0.91.1

2004-05-05 Thread beniniva

I've downloaded mono packages required for MonoDevelop but when I try to run
make also version 0.91.1 give me problems...
the compiler say:

*
make[3]: Entering directory
`/root/Desktop/DaInstallare/Mono_develop/gtk-sharp-0.91.1/glib'
/usr/local/bin/mcs /out:glib-sharp.dll /target:library  ./Boxed.cs
./ConnectBeforeAttribute.cs ./DefaultSignalHandlerAttribute.cs
./DelegateWrapper.cs ./EnumWrapper.cs ./FileUtils.cs ./GException.cs ./Idle.cs
./IWrapper.cs ./ListBase.cs ./List.cs ./Log.cs ./MainContext.cs
./ManagedValue.cs ./Markup.cs ./Marshaller.cs ./Object.cs ./ObjectManager.cs
./Opaque.cs ./SignalArgs.cs ./SignalAttribute.cs ./SignalCallback.cs ./SList.cs
./Source.cs ./Thread.cs ./Timeout.cs ./time_t_CustomMarshaler.cs
./TypeConverter.cs ./Type.cs ./TypeFundamentals.cs ./UnwrappedObject.cs
./ValueArray.cs ./Value.cs AssemblyInfo.cs
 
Unhandled Exception: System.NullReferenceException: A null value was found where
an object instance was required.
in 0x0002e Mono.Security.Cryptography.CryptoConvert:ToCapiKeyBlob
(System.Security.Cryptography.RSA,bool)
in 0x00032 Mono.Security.StrongName:get_PublicKey ()
in 0x00769 System.Reflection.Emit.AssemblyBuilder:Save (string)
in 0x00036 Mono.CSharp.CodeGen:Save (string)
in 0x014cb Mono.CSharp.Driver:MainDriver (string[])
in 0x00020 Mono.CSharp.Driver:Main (string[])
 
make[3]: *** [glib-sharp.dll] Error 1
make[3]: Leaving directory
`/root/Desktop/DaInstallare/Mono_develop/gtk-sharp-0.91.1/glib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/root/Desktop/DaInstallare/Mono_develop/gtk-sharp-0.91.1/glib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/root/Desktop/DaInstallare/Mono_develop/gtk-sharp-0.91.1'
make: *** [all] Error 2
[EMAIL PROTECTED] gtk-sharp-0.91.1]#

*
What can I do ?
 
Thanks,
 
Vale
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Problems with ODBC connection.

2004-03-10 Thread beniniva

I've an ODBC connection test named TestODBC.cs 
(connecting to MySQL database with a connection string) that works correctly 
on Windows XP using Visual Studio.Net 2003, but not on Mono.



I compiled and ran TestODBC.cs, but threre are errors.


On Windows:


mcs TestODBC.cs -r System.Data.dll

 Compilation succeeded



mono TestODBC.exe



 Unhandled Exception: System.Data.Odbc.OdbcException: Error in SQLAllocHandle

 in 0x000bb System.Data.Odbc.OdbcConnection:.ctor ()

 in 0xa System.Data.Odbc.OdbcConnection:.ctor (string)

 in 0x0004d (wrapper remoting-invoke-with-check)
System.Data.Odbc.OdbcConnection:.ctor (string)

 in 0x00066 TestODBC.Test:Main ()



On Linux (via UnixODBC)

# mcs TestODBC.cs  -r System.Data.dll
 Compilation succeeded

# mono TestODBC.exe
 
Unhandled Exception: System.DllNotFoundException: odbc32
in 0x0005c (wrapper managed-to-native) System.Data.Odbc.libodbc:SQLAllocHandle
 (System.Data.Odbc.OdbcHandleType,intptr,intptr)
in 0x00073 System.Data.Odbc.OdbcConnection:.ctor ()
in 0xa System.Data.Odbc.OdbcConnection:.ctor (string)
in 0x00056 (wrapper remoting-invoke-with-check) System.Data.Odbc.OdbcConnectio
n:.ctor (string)
in 0x00069 TestODBC.Test:Main ()


##

TestODBC.cs

##


using System;

using System.Data;

using System.Data.Odbc;



namespace TestODBC 

{

class Test 

{

public static void Main()

{ 

OdbcDataReader dbReader = null;

OdbcConnection conn = null;



conn = new OdbcConnection(DRIVER={MySQL ODBC 3.51
Driver};+SERVER=localhost;+DATABASE=db1;+UID=utente;+PASSWORD=utentepwd;);

conn.Open();



OdbcCommand rcmd = conn.CreateCommand();

rcmd.CommandText=select * from Indirizzi;

dbReader=rcmd.ExecuteReader();



Console.WriteLine();

for (int i=0; i3; i++)

{

Console.Write({0},{1}, dbReader.GetName(i),  );

}

Console.WriteLine(\n{0},  );



int Codice;

string Nome;

string Cognome;





while (dbReader.Read())

{

Codice = dbReader.GetInt32(0);

Nome = (string)dbReader.GetValue(1);

Cognome= (string)dbReader[Cognome];





Console.WriteLine({0}{1}{2}{3}{4}, Codice.ToString() 
, , Nome,
, Cognome);

}

dbReader.Close();

conn.Close();   

}

}

}
#

Where is the error?



Could anybody help me?



Thanks,



Vale.





___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Problems with ODBC Connection

2004-03-10 Thread beniniva

I've an ODBC connection test named TestODBC.cs 
(connecting to MySQL database with a connection string) that works correctly 
on Windows XP using Visual Studio.Net 2003, but not on Mono.

I compiled and ran TestODBC.cs, but threre are errors.

On Windows:

-mcs TestODBC.cs -r System.Data.dll

 Compilation succeeded

-mono TestODBC.exe

 Unhandled Exception: System.Data.Odbc.OdbcException: Error in SQLAllocHandle
 in 0x000bb System.Data.Odbc.OdbcConnection:.ctor ()
 in 0xa System.Data.Odbc.OdbcConnection:.ctor (string)
 in 0x0004d (wrapper remoting-invoke-with-check)
System.Data.Odbc.OdbcConnection:.ctor (string)
 in 0x00066 TestODBC.Test:Main ()


On Linux (via UnixODBC)

# mcs TestODBC.cs  -r System.Data.dll
 Compilation succeeded

# mono TestODBC.exe
 Unhandled Exception: System.DllNotFoundException: odbc32
in 0x0005c (wrapper managed-to-native)
System.Data.Odbc.libodbc:SQLAllocHandle
 (System.Data.Odbc.OdbcHandleType,intptr,intptr)
in 0x00073 System.Data.Odbc.OdbcConnection:.ctor ()
in 0xa System.Data.Odbc.OdbcConnection:.ctor (string)
in 0x00056 (wrapper remoting-invoke-with-check)
System.Data.Odbc.OdbcConnectio
n:.ctor (string)
in 0x00069 TestODBC.Test:Main ()

##
TestODBC.cs
##
using System;
using System.Data;
using System.Data.Odbc;

namespace TestODBC 
{class Test 
{
public static void Main()
{ 
OdbcDataReader dbReader = null;
OdbcConnection conn = null;
   
conn = new OdbcConnection(DRIVER={MySQL ODBC 3.51
Driver};+SERVER=localhost;+DATABASE=db1;+UID=utente;+PASSWORD=utentepwd;);
conn.Open();
.
.
.
.

##
Where is the error?
Could anybody help me?

Thanks,
Vale.


___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list