[Mono-devel-list] (no subject)

Gonzalo Paniagua Javier gonzalo at ximian.com
Tue Oct 14 07:22:13 EDT 2003


El mar, 14-10-2003 a las 06:20, Cezar Nasui escribió:
> Hi,
> 
> I'm working on an application that it suppose to display on the browser some
> values from an already running console application.
> The console application instanciates a class MyClass, modifies some
> properties and starts the web server (actually an instance of an
> ApplicationHost with all it needs to serve requests). So far so good, the
> "web server" starts, it serves basic pages, I print on console the new
> values for the MyClass properties, everything is fine.
> Now, I want to call an aspx page in the browser to display these values.
> What I did was to create a static method in the console application that I
> could call from the aspx page. After all the necessary Imports, the page
> shows in the browser but I don't get the actual values. Is like a new
> instance of the MyClass was created.
> That leads me to my questions :
> - does the web server start in a new process ? As I mentioned I'm starting
> it from the console application and I create it using
> 	--snip
> 	(XSPApplicationHost) host = (XSPApplicationHost)
> ApplicationHost.CreateApplicationHost()...
> 	host.Start();
> 	--snip

Each time you request a page, a new instance is created and processes
the request.

> 
> - there is a way I can get these values ? What are my options to make the 2
> applications, console and web, "talk" to each other (beside remoting)?

You have to create your own WorkerRequest that passes the faked data to
System.Web. mod_mono, for example, uses unix sockets, but you can use a
stream or whatever.

-Gonzalo





More information about the Mono-devel-list mailing list