RE: [Mono-list] A couple of Remoting Questions

2004-05-12 Thread Robert Remen
Hi,

1) You do not need a configuration file, but you must somehow configure
the remoting inside your application. You have two options:
- Call RemotingConfiguration.Configure(). You can use null as the
filename parameter. Passing a null reference as the filename parameter
will cause default remoting initialization without requiring the
existence of a configuration file.
Example: RemotingConfiguration.Configure(null);
- Call at least ChannelServices.RegisterChannel() passing as a parameter
an instance of channel class (in your case HttpChannel Class). You do
not need to define the port on the client side.
Example: ChannelServices.RegisterChannel(new HttpChannel());

2) I have RH9 with mono beta 1 installed. I have run your app for about
30 times (and also my own apps many times in past), but never seen such
a strange behavior... Everything works nice and clean, no asserts, no
left behind processes. I have no idea what's wrong.

3) Here ist the soap specification http://www.w3.org/TR/soap/ and here
http://msdn.microsoft.com/library/en-us/dnsoap/html/understandsoap.asp
an article from microsoft regarding soap (with good examples).

Robert

-Original Message-
From: Jonathan Stowe [mailto:[EMAIL PROTECTED] 
Sent: Montag, 10. Mai 2004 14:21
To: Mono-List
Subject: [Mono-list] A couple of Remoting Questions

I have been playing around with remoting and a couple of things have
come up

I am trying a test based in the example in MS SDK:

Client:

using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Http;

namespace RemotingTest
{
  public class Client
  {
public static void Main(string [] args)
{
  RemotingConfiguration.Configure(remoting.config);
  HelloServer obj =
(HelloServer)Activator.GetObject(typeof(RemotingTest.HelloServer),
http://localhost:8085/Hello;);
  if (obj == null)
  {
 System.Console.WriteLine(Could not locate server);
  }
  else
  {
 string name = blah;
 if ( args.Length  0 )
 {
name = args[0];
 }
 Console.WriteLine(obj.Hello(name));
  }
}
  }
}


Server:

using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Http;

namespace RemotingTest
{
  public class Server
  {

public static void Main(string [] args) {

  HttpChannel chan = new HttpChannel(8085);
  ChannelServices.RegisterChannel(chan);
 
RemotingConfiguration.RegisterWellKnownServiceType(Type.GetType(Remotin
gTest.HelloServer,Object), Hello, WellKnownObjectMode.SingleCall);
  System.Console.WriteLine(Hit enter to exit...);
  System.Console.ReadLine();
}
  }
}

Test Class:

using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Http;
using System.Reflection;

namespace RemotingTest
{
  public class HelloServer : MarshalByRefObject
  {

public HelloServer()
{
  Console.WriteLine(this.ToString() +  activated);
}

public String Hello(String name)
{
  Console.WriteLine(HelloServer.Hello : {0}, name);
  return String.Format(Hi there {0}, name);
}
  }
}


Firstly, unlike using the MS.NET SDK it will not work unless one loads
the configuration like:

configuration
   system.runtime.remoting
  application
 client
 /client
 channels
channel
   ref=http
   port=0
/
 /channels
  /application
   /system.runtime.remoting
/configuration

I was wondering why the difference in behaviour - does windows have the
http channels already registered in some default configuration which
mono doesn't have or is there a difference in behaviour of
ChannelServices.RegisterChannel() in the mono library - I notice that
the registered channels are stored in a static array in the
ChannelServices class so it strikes me that another program is not going
to have access to this - or am I missing something here?  It would be
nice to have an example that worked the same with both mono and the MS
SDK.

Secondly I am getting weird intermittent behaviour from both server and
client code - every once in a while I am getting:

** (process:5787): ERROR (recursed) **: file class.c: line 1272
(mono_class_init): assertion failed: (class) aborting...

from the client code, which appears to hang afterwards - the server
however behaves as expected.  I am unable to reproduce this at will
however.

I also am occasionally getting:

 
** (server.exe:12805): WARNING **: : unref on 38 called when ref was
already 0
 
From the server after the remote method has been called - again this is
intermittent and not reproducible at will.

It also appears that neither the client or the server are cleaning up
properly as there are parentless processes left behind (which I take to
be threads - but I never found out how to distinguish 

RE: [Mono-list] not installing mono.pc?

2004-05-06 Thread Robert Remen
Hi,

You need the mono-runtime-devel package.

Robert 

-Original Message-
From: Tyrel Haveman [mailto:[EMAIL PROTECTED] 
Sent: Donnerstag, 06. Mai 2004 06:45
To: [EMAIL PROTECTED]
Subject: [Mono-list] not installing mono.pc?

I installed mono beta 1 earlier today, and attempted to install
MonoDevelop 0.3 as well. However, when I try to ./configure MonoDevelop,
I get the message:
Package mono was not found in the pkg-config search path.
Perhaps you should add the directory containing `mono.pc'
to the PKG_CONFIG_PATH environment variable No package 'mono' found

I ran a search on all of my hard disks and there is no mono.pc file
anywhere. So how am I supposed to satisfy this library dependancy
btw, I installed mono using the yum repository for Fedora Core 1, if
this makes any difference (I should get the same stuff!)

Anyone have any ideas?

-Tyrel Haveman


___
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] How do I get the RPMs I need

2004-04-23 Thread Robert Remen
Hi!

You can find all packages that you need to install latest mono RPM for
RH 9 here:

http://www.go-mono.com/archive/0.31/redhat-9-i386/

Robert

-Original Message-
From: Peter Foley [mailto:[EMAIL PROTECTED] 
Sent: Freitag, 23. April 2004 02:30
To: [EMAIL PROTECTED]
Subject: [Mono-list] How do I get the RPMs I need



I have downloaded the Mono RPMs to a RedHat 9 install. The PC is NOT
connected
to the internet (for security reasons). How do I get all the
dependencies I need
(and what are they)?

Is it possible for the MONO project to a) keep a mirror of all the RPMs
they
need for Mono b) supply a command file that installs them in the right
order?

PS This is my first taste of Linux




---
ABS Web Site:  www.abs.gov.au

___
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] c# written daemon, System.ServiceProcess, posix signals handling...

2004-04-18 Thread Robert Remen
Hi!

I need to write an application in c#, wich should run in background and
be able to shut down gracefully when required.
The best solution would be to use the System.ServiceProcess namespace,
but this namespace is not implemented in mono. I know that there were
some discussion about this topic in summer 2003, but since i found
nothing. Is there something new in this direction?
The other way (not so nice, but would also do the job) would be the
catching of posix signals (SIGINT, SIGTERM...) but i have no idea how to
do thin in an mono application.
The last solution is to use some selfmade communication mechnism, to
comunicate with the process and initiate the shutdow - maybe using
remoting or some simpler mechanism.
Can someone give me some infos or ideas for the solution?

Thanx

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