Groups | Blog | Home
all groups > dotnet remoting > may 2004 >

dotnet remoting : Chicken and the egg situation help



Lee Alexander
5/20/2004 3:20:04 PM
I have a remoting object (singleton) that when activated listens for
mutlicast messages so that it can tell clients where it is. The clients then
access the remoting objects methods from there. The problem I'm having is
that under IIS the object is not instantiated untill the first call to it
which of course will be never happen because no clients can find it (doh).
Anyway this isn't a problem when *not* running under IIS as I simply call
RemotingServices.Marshal with a new server object on application startup.
How can I do this under IIS (if at all).

All help is much appreciated....

Regards
Lee


Dilip Krishnan
5/21/2004 4:33:30 AM
If I'm not missing something couldnt you do the same on
Application_OnStart in global.asax?


Regards,
Dilip Krishnan
MCAD, MCSD.net
dilipdotnet at apdiya dot com

[quoted text, click to view]
Allen Anderson
5/21/2004 10:49:09 AM
actually, IIS should indeed start up your object. You must have
something else going wrong here. How exactly are you setting up your
object in IIS?

Allen Anderson
http://www.glacialcomponents.com
mailto: allen@put my website url here.com

On Thu, 20 May 2004 15:20:04 +0100, "Lee Alexander"
[quoted text, click to view]
Allen Anderson
5/24/2004 8:46:39 AM
I think I see your problem. Hosting an object in IIS is assuming by
default that you want to use IIS for your communications. IIS will
indeed wake up your object on the first call to it through IIS.
However, your object will not automatically be instanced so it can
listen on another port for multicast events. Yoiu need to put this
object in a system service or some other hosting mechanism to get it
to run immediately right off.

On Mon, 24 May 2004 10:31:58 +0100, "Lee Alexander"
[quoted text, click to view]
Lee Alexander
5/24/2004 10:31:58 AM
This is the web config I use:

<configuration>
<system.web>
<authentication mode="Windows" />
<identity impersonate="true" userName="somedomain/someusername"
password="blahblah"/>
</system.web>
<system.runtime.remoting>
<application>
<service>
<wellknown mode="Singleton" objectUri="BudServer.rem"
type="Digita.Bud.BudServer, BudService"/>
</service>
<channels>
<channel ref="http"/>
</channels>
</application>
</system.runtime.remoting>
</configuration>

Regards
Lee

[quoted text, click to view]

Lee Alexander
5/24/2004 10:34:59 AM
Thanks I'll have a look...

[quoted text, click to view]

Lee Alexander
5/24/2004 11:54:54 AM
Having had a look it seems like the Global.asax file doesn't actually get
parsed until the first request is received which is no good for me as the
server object really needs to be instantiated as soon as its dropped into
the bin folder so that it can start listening for multicast broadcasts from
clients.

Regards
Lee

[quoted text, click to view]

Lee Alexander
5/25/2004 8:44:51 AM
[quoted text, click to view]
I figured I might have to go that route. Thanks for your help!

Regards
Lee

[quoted text, click to view]

AddThis Social Bookmark Button