Re: Singleton Objects Dying
From: Fred Hirschfeld (a_at_b.c)
Date: 03/24/05
- Next message: msuk: "Re: C# remote server and host application"
- Previous message: Fred Hirschfeld: "Re: dataset -> xml stream -> dataset"
- In reply to: Ahmed: "Re: Singleton Objects Dying"
- Next in thread: Ahmed: "Re: Singleton Objects Dying"
- Reply: Ahmed: "Re: Singleton Objects Dying"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 24 Mar 2005 06:44:20 -0800
If you are creating entries in the App.config (or web.config for IIS hosted)
then post that <system.remoting>...</system.remoting> text from there. If
you are using a sample that is configuring through code then post that code
snippet so we can see how the initialization happens.
Try running the URL directly in a web browser with the "?WSDL" at the end of
the URL (without the quotes). This should show you any error that is being
returned by the system.
You should also evaluate your server code to see if there is a memory issue.
Note that IIS does have "features" in the application pool that could be
doing this on you. Are you running IIS 5.1 or IIS6? If 6, then take a look
at the application pool settings to get familiar with them. If IIS 5.1 then
you need to look at COM+ Component Services area for these but ONLY if you
have set the application to "High (Isolate)" which I would recommend so you
have control over your application performance.
How is the memory on the machine as clients are making the requests? Are
these requests heavy memory users and slow or are they fast?
Also what type of information is your singleton contain that is common
across calls? If there is nothing common then there should not be any
threading issues. You would only see threading issues if you are accessing
something common to the threads. I am assuming that you do have something
common and that is why you are using the Singleton, right?
Fred
"Ahmed" <ahmedbm@gmail.com> wrote in message
news:1111668902.591130.22910@g14g2000cwa.googlegroups.com...
> Not quite sure what to answer on that, basically followed instructions
> from a WROX book in VB.NET professional and they simply stated to
> create a class that inherits from MarshalByRefObject.
>
> Public Class Competition
> Inherits MarshalByRefObject
> Implements Competition.IComp
>
> >From the client i am initializing like this.
>
> Competition = CType(Activator.GetObject(GetType(Competition.IComp),
> "http://www.********.net/Competition/Competition.rem"),
> Competition.IComp)
>
> I am just not sure what type of remoting it is and it tends to die on
> me with miscelaneous exception calls, i have a feeling the objects are
> not getting destroyed. I tried overriding the
> InitializeLifetimeService() method returning a lease of 100 mins and
> also tried returning nothing. They both tend to die at the same time.
>
> Any suggestions on how i should be initialising this class so there is
> only one instance running at a time?
>
- Next message: msuk: "Re: C# remote server and host application"
- Previous message: Fred Hirschfeld: "Re: dataset -> xml stream -> dataset"
- In reply to: Ahmed: "Re: Singleton Objects Dying"
- Next in thread: Ahmed: "Re: Singleton Objects Dying"
- Reply: Ahmed: "Re: Singleton Objects Dying"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|