473,888 Members | 1,551 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Client causing remotable application to freeze

Hi,

I am having a freezing issue with my application. My application serves
several remotable objects, all of which must be initialized before their
use. Furthermore, some of them depend on each other. On my application
startup, I configure the objects usting the RemotingConfigu ration class to
load the config file. Then I "ping" each of the objects to call their
constructors. This all works fine if no one is attempting to connect at the
time, but if a client application attempts to connect to my application
while the startup is happening, both the client and my application hang
indefinitely. I am attempting to find a way to block client access to the
objects before they are initialized, but the channel must exist for me to
initialize them. Any help would be greatly appreciated!

-Tim
Nov 15 '05 #1
11 2788

Hi Timothy,

Thank you for posting in MSDN Managed newsgroup.
I will reply you after my research.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Timothy Shih" <ts***@sensicas t.com>
| Subject: Client causing remotable application to freeze
| Date: Mon, 25 Aug 2003 11:26:00 -0400
| Lines: 17
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <O5************ *@tk2msftngp13. phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| NNTP-Posting-Host: dsl092-093-226.bos1.dsl.sp eakeasy.net 66.92.93.226
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1791 56
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
|
| Hi,
|
| I am having a freezing issue with my application. My application serves
| several remotable objects, all of which must be initialized before their
| use. Furthermore, some of them depend on each other. On my application
| startup, I configure the objects usting the RemotingConfigu ration class to
| load the config file. Then I "ping" each of the objects to call their
| constructors. This all works fine if no one is attempting to connect at
the
| time, but if a client application attempts to connect to my application
| while the startup is happening, both the client and my application hang
| indefinitely. I am attempting to find a way to block client access to the
| objects before they are initialized, but the channel must exist for me to
| initialize them. Any help would be greatly appreciated!
|
| -Tim
|
|
|

Nov 15 '05 #2
Ok Jeffrey, thank you for taking the time to look into this!

-Tim
"Jeffrey Tan[MSFT]" <v-*****@online.mi crosoft.com> wrote in message
news:yW******** ******@cpmsftng xa06.phx.gbl...

Hi Timothy,

Thank you for posting in MSDN Managed newsgroup.
I will reply you after my research.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Timothy Shih" <ts***@sensicas t.com>
| Subject: Client causing remotable application to freeze
| Date: Mon, 25 Aug 2003 11:26:00 -0400
| Lines: 17
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <O5************ *@tk2msftngp13. phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| NNTP-Posting-Host: dsl092-093-226.bos1.dsl.sp eakeasy.net 66.92.93.226
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1791 56 | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
|
| Hi,
|
| I am having a freezing issue with my application. My application serves
| several remotable objects, all of which must be initialized before their
| use. Furthermore, some of them depend on each other. On my application
| startup, I configure the objects usting the RemotingConfigu ration class to | load the config file. Then I "ping" each of the objects to call their
| constructors. This all works fine if no one is attempting to connect at
the
| time, but if a client application attempts to connect to my application
| while the startup is happening, both the client and my application hang
| indefinitely. I am attempting to find a way to block client access to the | objects before they are initialized, but the channel must exist for me to | initialize them. Any help would be greatly appreciated!
|
| -Tim
|
|
|

Nov 15 '05 #3

Hi Timothy,

Thank your for posting in this group.

Do you get any exception from your application?
If you get, please show me the exception.
The remotable objects will not be initialized until your client create a
instance of it, so what
does your initialize mean?
Is your connection synchronized or asynchronized?

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Timothy Shih" <ts***@sensicas t.com>
| Subject: Client causing remotable application to freeze
| Date: Mon, 25 Aug 2003 11:26:00 -0400
| Lines: 17
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <O5************ *@tk2msftngp13. phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| NNTP-Posting-Host: dsl092-093-226.bos1.dsl.sp eakeasy.net 66.92.93.226
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1791 56
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
|
| Hi,
|
| I am having a freezing issue with my application. My application serves
| several remotable objects, all of which must be initialized before their
| use. Furthermore, some of them depend on each other. On my application
| startup, I configure the objects usting the RemotingConfigu ration class to
| load the config file. Then I "ping" each of the objects to call their
| constructors. This all works fine if no one is attempting to connect at
the
| time, but if a client application attempts to connect to my application
| while the startup is happening, both the client and my application hang
| indefinitely. I am attempting to find a way to block client access to the
| objects before they are initialized, but the channel must exist for me to
| initialize them. Any help would be greatly appreciated!
|
| -Tim
|
|
|

Nov 15 '05 #4

Hi Timothy,

Thank you for your information.

Base on my understanding, your activation mode is server side sington.
And your problem seemed related to the class dependency.
I will simulate your problem:
You have class A,B,C in server side.
A has some variables refering instances of B and C, so before initialize
object A, you must
initialize B and C from client side.
So you created a temp client and initialize objects as order B C A.
But during your initialization, if another client connects your server and
wants to use object A,
you application will freeze(Because your objects B and C have not been
initialized).

I think the workaround is putting your initialization of objects B and C in
the constructor of A, then
your temp client is no need and the problem will not arise.

If I misunderstand your meanning, please feel free to let me know.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Timothy Shih" <ts***@sensicas t.com>
| References: <O5************ *@tk2msftngp13. phx.gbl>
<NE************ **@cpmsftngxa06 .phx.gbl>
| Subject: Re: Client causing remotable application to freeze
| Date: Thu, 28 Aug 2003 08:59:44 -0400
| Lines: 77
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <uq************ **@TK2MSFTNGP10 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| NNTP-Posting-Host: dsl092-093-226.bos1.dsl.sp eakeasy.net 66.92.93.226
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1802 18
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
|
| Hi Jeffrey,
|
| No, I don't get any exception as it just hangs indefinitely. Eventually I
| just end the process and restart it. What I do is register the objects,
but
| I do not want the client to initialize it. Therefore I spoof a client and
| ping all the remotable objects on startup so that I can initialize them in
| the correct order (one of the objects is necessary for all of the other
ones
| to run). Basically, i need to create an instance of each of the objects
| before an actual client can attempt to access them. However, the problem
| comes when a client attempts to access the objects as I am initalizing
them
| (thereby disrupting the order of initialization) . What I would like is to
be
| able to block client access to the objects until I initialize them on my
| end. Thanks!
|
| Tim
| "Jeffrey Tan[MSFT]" <v-*****@online.mi crosoft.com> wrote in message
| news:NE******** ******@cpmsftng xa06.phx.gbl...
| >
| > Hi Timothy,
| >
| > Thank your for posting in this group.
| >
| > Do you get any exception from your application?
| > If you get, please show me the exception.
| > The remotable objects will not be initialized until your client create a
| > instance of it, so what
| > does your initialize mean?
| > Is your connection synchronized or asynchronized?
| >
| > Best regards,
| > Jeffrey Tan
| > Microsoft Online Partner Support
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > | From: "Timothy Shih" <ts***@sensicas t.com>
| > | Subject: Client causing remotable application to freeze
| > | Date: Mon, 25 Aug 2003 11:26:00 -0400
| > | Lines: 17
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <O5************ *@tk2msftngp13. phx.gbl>
| > | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| > | NNTP-Posting-Host: dsl092-093-226.bos1.dsl.sp eakeasy.net 66.92.93.226
| > | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
| > | Xref: cpmsftngxa06.ph x.gbl
| microsoft.publi c.dotnet.langua ges.csharp:1791 56
| > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
| > |
| > | Hi,
| > |
| > | I am having a freezing issue with my application. My application
serves
| > | several remotable objects, all of which must be initialized before
their
| > | use. Furthermore, some of them depend on each other. On my application
| > | startup, I configure the objects usting the RemotingConfigu ration
class
| to
| > | load the config file. Then I "ping" each of the objects to call their
| > | constructors. This all works fine if no one is attempting to connect
at
| > the
| > | time, but if a client application attempts to connect to my
application
| > | while the startup is happening, both the client and my application
hang
| > | indefinitely. I am attempting to find a way to block client access to
| the
| > | objects before they are initialized, but the channel must exist for me
| to
| > | initialize them. Any help would be greatly appreciated!
| > |
| > | -Tim
| > |
| > |
| > |
| >
|
|
|

Nov 15 '05 #5
Hi Jeffrey,

Yes that is basically my problem the way you described it.My first solution
was the one that you suggested (activate the objects from the dependencies
constructor). However, when i did that, my application caused itself to
freeze indefinitely, (in other words, I am attempting to have one remotable
object activate another remotable object and this causes it to freeze). So
in order to solve that, i created a temp client to activate the objects. To
instantiate the class I am simply calling Activator.GetOb ject() and then
calling a Ping() method to force the singleton object to instantiate. If
there is another methods to instantiate a remotable objects within another
remotable object perhaps I will try to instantiate the the class from within
the dependency's constructor.

Thanks for your help!
Tim
"Jeffrey Tan[MSFT]" <v-*****@online.mi crosoft.com> wrote in message
news:E2******** ******@cpmsftng xa06.phx.gbl...

Hi Timothy,

Thank you for your information.

Base on my understanding, your activation mode is server side sington.
And your problem seemed related to the class dependency.
I will simulate your problem:
You have class A,B,C in server side.
A has some variables refering instances of B and C, so before initialize
object A, you must
initialize B and C from client side.
So you created a temp client and initialize objects as order B C A.
But during your initialization, if another client connects your server and
wants to use object A,
you application will freeze(Because your objects B and C have not been
initialized).

I think the workaround is putting your initialization of objects B and C in the constructor of A, then
your temp client is no need and the problem will not arise.

If I misunderstand your meanning, please feel free to let me know.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Timothy Shih" <ts***@sensicas t.com>
| References: <O5************ *@tk2msftngp13. phx.gbl>
<NE************ **@cpmsftngxa06 .phx.gbl>
| Subject: Re: Client causing remotable application to freeze
| Date: Thu, 28 Aug 2003 08:59:44 -0400
| Lines: 77
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <uq************ **@TK2MSFTNGP10 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| NNTP-Posting-Host: dsl092-093-226.bos1.dsl.sp eakeasy.net 66.92.93.226
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1802 18 | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
|
| Hi Jeffrey,
|
| No, I don't get any exception as it just hangs indefinitely. Eventually I | just end the process and restart it. What I do is register the objects,
but
| I do not want the client to initialize it. Therefore I spoof a client and | ping all the remotable objects on startup so that I can initialize them in | the correct order (one of the objects is necessary for all of the other
ones
| to run). Basically, i need to create an instance of each of the objects
| before an actual client can attempt to access them. However, the problem
| comes when a client attempts to access the objects as I am initalizing
them
| (thereby disrupting the order of initialization) . What I would like is to be
| able to block client access to the objects until I initialize them on my
| end. Thanks!
|
| Tim
| "Jeffrey Tan[MSFT]" <v-*****@online.mi crosoft.com> wrote in message
| news:NE******** ******@cpmsftng xa06.phx.gbl...
| >
| > Hi Timothy,
| >
| > Thank your for posting in this group.
| >
| > Do you get any exception from your application?
| > If you get, please show me the exception.
| > The remotable objects will not be initialized until your client create a | > instance of it, so what
| > does your initialize mean?
| > Is your connection synchronized or asynchronized?
| >
| > Best regards,
| > Jeffrey Tan
| > Microsoft Online Partner Support
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > | From: "Timothy Shih" <ts***@sensicas t.com>
| > | Subject: Client causing remotable application to freeze
| > | Date: Mon, 25 Aug 2003 11:26:00 -0400
| > | Lines: 17
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <O5************ *@tk2msftngp13. phx.gbl>
| > | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| > | NNTP-Posting-Host: dsl092-093-226.bos1.dsl.sp eakeasy.net 66.92.93.226 | > | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
| > | Xref: cpmsftngxa06.ph x.gbl
| microsoft.publi c.dotnet.langua ges.csharp:1791 56
| > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
| > |
| > | Hi,
| > |
| > | I am having a freezing issue with my application. My application
serves
| > | several remotable objects, all of which must be initialized before
their
| > | use. Furthermore, some of them depend on each other. On my application | > | startup, I configure the objects usting the RemotingConfigu ration
class
| to
| > | load the config file. Then I "ping" each of the objects to call their | > | constructors. This all works fine if no one is attempting to connect
at
| > the
| > | time, but if a client application attempts to connect to my
application
| > | while the startup is happening, both the client and my application
hang
| > | indefinitely. I am attempting to find a way to block client access to | the
| > | objects before they are initialized, but the channel must exist for me | to
| > | initialize them. Any help would be greatly appreciated!
| > |
| > | -Tim
| > |
| > |
| > |
| >
|
|
|

Nov 15 '05 #6

Hi Timothy,

Can you tell me why it will freeze?
I feel strange that it will freeze.
How do you initialize B and C in A's consturctor?
You initialize them through remoting service or just initialize at server
side?
If you implemented it just at server side, it should not freeze.

If it still does not work, please feel free to let me know.
We are glad to help you.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Timothy Shih" <ts***@sensicas t.com>
| References: <O5************ *@tk2msftngp13. phx.gbl>
<NE************ **@cpmsftngxa06 .phx.gbl>
<uq************ **@TK2MSFTNGP10 .phx.gbl>
<E2************ **@cpmsftngxa06 .phx.gbl>
| Subject: Re: Client causing remotable application to freeze
| Date: Fri, 29 Aug 2003 09:13:38 -0400
| Lines: 170
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#v************ **@tk2msftngp13 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| NNTP-Posting-Host: dsl092-093-226.bos1.dsl.sp eakeasy.net 66.92.93.226
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1806 27
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
|
| Hi Jeffrey,
|
| Yes that is basically my problem the way you described it.My first
solution
| was the one that you suggested (activate the objects from the dependencies
| constructor). However, when i did that, my application caused itself to
| freeze indefinitely, (in other words, I am attempting to have one
remotable
| object activate another remotable object and this causes it to freeze). So
| in order to solve that, i created a temp client to activate the objects.
To
| instantiate the class I am simply calling Activator.GetOb ject() and then
| calling a Ping() method to force the singleton object to instantiate. If
| there is another methods to instantiate a remotable objects within another
| remotable object perhaps I will try to instantiate the the class from
within
| the dependency's constructor.
|
| Thanks for your help!
| Tim
| "Jeffrey Tan[MSFT]" <v-*****@online.mi crosoft.com> wrote in message
| news:E2******** ******@cpmsftng xa06.phx.gbl...
| >
| > Hi Timothy,
| >
| > Thank you for your information.
| >
| > Base on my understanding, your activation mode is server side sington.
| > And your problem seemed related to the class dependency.
| > I will simulate your problem:
| > You have class A,B,C in server side.
| > A has some variables refering instances of B and C, so before initialize
| > object A, you must
| > initialize B and C from client side.
| > So you created a temp client and initialize objects as order B C A.
| > But during your initialization, if another client connects your server
and
| > wants to use object A,
| > you application will freeze(Because your objects B and C have not been
| > initialized).
| >
| > I think the workaround is putting your initialization of objects B and C
| in
| > the constructor of A, then
| > your temp client is no need and the problem will not arise.
| >
| > If I misunderstand your meanning, please feel free to let me know.
| >
| > Best regards,
| > Jeffrey Tan
| > Microsoft Online Partner Support
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > | From: "Timothy Shih" <ts***@sensicas t.com>
| > | References: <O5************ *@tk2msftngp13. phx.gbl>
| > <NE************ **@cpmsftngxa06 .phx.gbl>
| > | Subject: Re: Client causing remotable application to freeze
| > | Date: Thu, 28 Aug 2003 08:59:44 -0400
| > | Lines: 77
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <uq************ **@TK2MSFTNGP10 .phx.gbl>
| > | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| > | NNTP-Posting-Host: dsl092-093-226.bos1.dsl.sp eakeasy.net 66.92.93.226
| > | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
| > | Xref: cpmsftngxa06.ph x.gbl
| microsoft.publi c.dotnet.langua ges.csharp:1802 18
| > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
| > |
| > | Hi Jeffrey,
| > |
| > | No, I don't get any exception as it just hangs indefinitely.
Eventually
| I
| > | just end the process and restart it. What I do is register the
objects,
| > but
| > | I do not want the client to initialize it. Therefore I spoof a client
| and
| > | ping all the remotable objects on startup so that I can initialize
them
| in
| > | the correct order (one of the objects is necessary for all of the
other
| > ones
| > | to run). Basically, i need to create an instance of each of the
objects
| > | before an actual client can attempt to access them. However, the
problem
| > | comes when a client attempts to access the objects as I am initalizing
| > them
| > | (thereby disrupting the order of initialization) . What I would like is
| to
| > be
| > | able to block client access to the objects until I initialize them on
my
| > | end. Thanks!
| > |
| > | Tim
| > | "Jeffrey Tan[MSFT]" <v-*****@online.mi crosoft.com> wrote in message
| > | news:NE******** ******@cpmsftng xa06.phx.gbl...
| > | >
| > | > Hi Timothy,
| > | >
| > | > Thank your for posting in this group.
| > | >
| > | > Do you get any exception from your application?
| > | > If you get, please show me the exception.
| > | > The remotable objects will not be initialized until your client
create
| a
| > | > instance of it, so what
| > | > does your initialize mean?
| > | > Is your connection synchronized or asynchronized?
| > | >
| > | > Best regards,
| > | > Jeffrey Tan
| > | > Microsoft Online Partner Support
| > | > Get Secure! - www.microsoft.com/security
| > | > This posting is provided "as is" with no warranties and confers no
| > rights.
| > | >
| > | > --------------------
| > | > | From: "Timothy Shih" <ts***@sensicas t.com>
| > | > | Subject: Client causing remotable application to freeze
| > | > | Date: Mon, 25 Aug 2003 11:26:00 -0400
| > | > | Lines: 17
| > | > | X-Priority: 3
| > | > | X-MSMail-Priority: Normal
| > | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | > | Message-ID: <O5************ *@tk2msftngp13. phx.gbl>
| > | > | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| > | > | NNTP-Posting-Host: dsl092-093-226.bos1.dsl.sp eakeasy.net
| 66.92.93.226
| > | > | Path:
cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
| > | > | Xref: cpmsftngxa06.ph x.gbl
| > | microsoft.publi c.dotnet.langua ges.csharp:1791 56
| > | > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
| > | > |
| > | > | Hi,
| > | > |
| > | > | I am having a freezing issue with my application. My application
| > serves
| > | > | several remotable objects, all of which must be initialized before
| > their
| > | > | use. Furthermore, some of them depend on each other. On my
| application
| > | > | startup, I configure the objects usting the RemotingConfigu ration
| > class
| > | to
| > | > | load the config file. Then I "ping" each of the objects to call
| their
| > | > | constructors. This all works fine if no one is attempting to
connect
| > at
| > | > the
| > | > | time, but if a client application attempts to connect to my
| > application
| > | > | while the startup is happening, both the client and my application
| > hang
| > | > | indefinitely. I am attempting to find a way to block client access
| to
| > | the
| > | > | objects before they are initialized, but the channel must exist
for
| me
| > | to
| > | > | initialize them. Any help would be greatly appreciated!
| > | > |
| > | > | -Tim
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|

Nov 15 '05 #7

Hi Timothy,

Does your project work?
If it still does not work, can you show me more information?
I have asked you some questions in last articles, please check it.

Thanks
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Timothy Shih" <ts***@sensicas t.com>
| References: <O5************ *@tk2msftngp13. phx.gbl>
<NE************ **@cpmsftngxa06 .phx.gbl>
<uq************ **@TK2MSFTNGP10 .phx.gbl>
<E2************ **@cpmsftngxa06 .phx.gbl>
| Subject: Re: Client causing remotable application to freeze
| Date: Fri, 29 Aug 2003 09:13:38 -0400
| Lines: 170
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#v************ **@tk2msftngp13 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| NNTP-Posting-Host: dsl092-093-226.bos1.dsl.sp eakeasy.net 66.92.93.226
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1806 27
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
|
| Hi Jeffrey,
|
| Yes that is basically my problem the way you described it.My first
solution
| was the one that you suggested (activate the objects from the dependencies
| constructor). However, when i did that, my application caused itself to
| freeze indefinitely, (in other words, I am attempting to have one
remotable
| object activate another remotable object and this causes it to freeze). So
| in order to solve that, i created a temp client to activate the objects.
To
| instantiate the class I am simply calling Activator.GetOb ject() and then
| calling a Ping() method to force the singleton object to instantiate. If
| there is another methods to instantiate a remotable objects within another
| remotable object perhaps I will try to instantiate the the class from
within
| the dependency's constructor.
|
| Thanks for your help!
| Tim
| "Jeffrey Tan[MSFT]" <v-*****@online.mi crosoft.com> wrote in message
| news:E2******** ******@cpmsftng xa06.phx.gbl...
| >
| > Hi Timothy,
| >
| > Thank you for your information.
| >
| > Base on my understanding, your activation mode is server side sington.
| > And your problem seemed related to the class dependency.
| > I will simulate your problem:
| > You have class A,B,C in server side.
| > A has some variables refering instances of B and C, so before initialize
| > object A, you must
| > initialize B and C from client side.
| > So you created a temp client and initialize objects as order B C A.
| > But during your initialization, if another client connects your server
and
| > wants to use object A,
| > you application will freeze(Because your objects B and C have not been
| > initialized).
| >
| > I think the workaround is putting your initialization of objects B and C
| in
| > the constructor of A, then
| > your temp client is no need and the problem will not arise.
| >
| > If I misunderstand your meanning, please feel free to let me know.
| >
| > Best regards,
| > Jeffrey Tan
| > Microsoft Online Partner Support
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > | From: "Timothy Shih" <ts***@sensicas t.com>
| > | References: <O5************ *@tk2msftngp13. phx.gbl>
| > <NE************ **@cpmsftngxa06 .phx.gbl>
| > | Subject: Re: Client causing remotable application to freeze
| > | Date: Thu, 28 Aug 2003 08:59:44 -0400
| > | Lines: 77
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <uq************ **@TK2MSFTNGP10 .phx.gbl>
| > | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| > | NNTP-Posting-Host: dsl092-093-226.bos1.dsl.sp eakeasy.net 66.92.93.226
| > | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
| > | Xref: cpmsftngxa06.ph x.gbl
| microsoft.publi c.dotnet.langua ges.csharp:1802 18
| > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
| > |
| > | Hi Jeffrey,
| > |
| > | No, I don't get any exception as it just hangs indefinitely.
Eventually
| I
| > | just end the process and restart it. What I do is register the
objects,
| > but
| > | I do not want the client to initialize it. Therefore I spoof a client
| and
| > | ping all the remotable objects on startup so that I can initialize
them
| in
| > | the correct order (one of the objects is necessary for all of the
other
| > ones
| > | to run). Basically, i need to create an instance of each of the
objects
| > | before an actual client can attempt to access them. However, the
problem
| > | comes when a client attempts to access the objects as I am initalizing
| > them
| > | (thereby disrupting the order of initialization) . What I would like is
| to
| > be
| > | able to block client access to the objects until I initialize them on
my
| > | end. Thanks!
| > |
| > | Tim
| > | "Jeffrey Tan[MSFT]" <v-*****@online.mi crosoft.com> wrote in message
| > | news:NE******** ******@cpmsftng xa06.phx.gbl...
| > | >
| > | > Hi Timothy,
| > | >
| > | > Thank your for posting in this group.
| > | >
| > | > Do you get any exception from your application?
| > | > If you get, please show me the exception.
| > | > The remotable objects will not be initialized until your client
create
| a
| > | > instance of it, so what
| > | > does your initialize mean?
| > | > Is your connection synchronized or asynchronized?
| > | >
| > | > Best regards,
| > | > Jeffrey Tan
| > | > Microsoft Online Partner Support
| > | > Get Secure! - www.microsoft.com/security
| > | > This posting is provided "as is" with no warranties and confers no
| > rights.
| > | >
| > | > --------------------
| > | > | From: "Timothy Shih" <ts***@sensicas t.com>
| > | > | Subject: Client causing remotable application to freeze
| > | > | Date: Mon, 25 Aug 2003 11:26:00 -0400
| > | > | Lines: 17
| > | > | X-Priority: 3
| > | > | X-MSMail-Priority: Normal
| > | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | > | Message-ID: <O5************ *@tk2msftngp13. phx.gbl>
| > | > | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| > | > | NNTP-Posting-Host: dsl092-093-226.bos1.dsl.sp eakeasy.net
| 66.92.93.226
| > | > | Path:
cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
| > | > | Xref: cpmsftngxa06.ph x.gbl
| > | microsoft.publi c.dotnet.langua ges.csharp:1791 56
| > | > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
| > | > |
| > | > | Hi,
| > | > |
| > | > | I am having a freezing issue with my application. My application
| > serves
| > | > | several remotable objects, all of which must be initialized before
| > their
| > | > | use. Furthermore, some of them depend on each other. On my
| application
| > | > | startup, I configure the objects usting the RemotingConfigu ration
| > class
| > | to
| > | > | load the config file. Then I "ping" each of the objects to call
| their
| > | > | constructors. This all works fine if no one is attempting to
connect
| > at
| > | > the
| > | > | time, but if a client application attempts to connect to my
| > application
| > | > | while the startup is happening, both the client and my application
| > hang
| > | > | indefinitely. I am attempting to find a way to block client access
| to
| > | the
| > | > | objects before they are initialized, but the channel must exist
for
| me
| > | to
| > | > | initialize them. Any help would be greatly appreciated!
| > | > |
| > | > | -Tim
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|

Nov 15 '05 #8

Hi Timothy,

I am glad your original problem resolved.
For your new problem, I will do some research on it.
I will reply to you after research.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Timothy Shih" <ts***@sensicas t.com>
| References: <O5************ *@tk2msftngp13. phx.gbl>
<NE************ **@cpmsftngxa06 .phx.gbl>
<uq************ **@TK2MSFTNGP10 .phx.gbl>
<E2************ **@cpmsftngxa06 .phx.gbl>
<#v************ **@tk2msftngp13 .phx.gbl>
<8p************ **@cpmsftngxa06 .phx.gbl>
| Subject: Re: Client causing remotable application to freeze
| Date: Fri, 5 Sep 2003 14:35:55 -0400
| Lines: 276
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <un************ *@TK2MSFTNGP11. phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| NNTP-Posting-Host: dsl092-093-226.bos1.dsl.sp eakeasy.net 66.92.93.226
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP11.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1826 76
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
|
| Hi Jeffrey,
|
| Yes, I have resolved the issue, I am able to initialize a remotable object
| through another remotable object. I was attempting to pass a reference to
| the remotable object to a separate class and have that class initialize
it,
| but that led to the freeze. By intializing all remotable objects that a
| given remotable object depends (within that constructor) it does not
matter
| which order the objects are initialized since each one initializes all of
| them. Thanks for your help on this issue, and sorry for not updating you!
|
| In any case, I have encountered a separate problem and I am not sure if
you
| may be of help. In particular, I would like to be notified when an event
| occurs within a remotable objects. However, the object to be notified is
NOT
| remotable, and furthermore, cannot be marked as serializable. This is
| because it contains several threads (System.Threadi ng objects). It seems
| that when I attempt to pass a delegate to the remotable class the compiler
| complains by saying that System.Threadin g is not marked as serializable.
| Essentially, this class handles requests from a network layer such (both
| RS232 and TCP). The remotable class handles requests from a client (over
TCP
| or HTTP). when an event occurs in the remotable class, I would like the
| network object to be notified.
|
| I have attempted to solve the problem by creating a separate
| "SerializableEv entHandler" class which handles events from the remotable
| object and then passes the event down to the network layer, but it still
| complains about the network object not being serializable (essentially I
| added another link to an already broken chain). If you have any way or
idea
| of getting a remotable object to notify a non-remotable, non-serializable
| object of an event (or event making threads serializable!) I would be very
| grateful!
|
| Thanks again,
| Tim
|
| "Jeffrey Tan[MSFT]" <v-*****@online.mi crosoft.com> wrote in message
| news:8p******** ******@cpmsftng xa06.phx.gbl...
| >
| > Hi Timothy,
| >
| > Does your project work?
| > If it still does not work, can you show me more information?
| > I have asked you some questions in last articles, please check it.
| >
| > Thanks
| > Best regards,
| > Jeffrey Tan
| > Microsoft Online Partner Support
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > | From: "Timothy Shih" <ts***@sensicas t.com>
| > | References: <O5************ *@tk2msftngp13. phx.gbl>
| > <NE************ **@cpmsftngxa06 .phx.gbl>
| > <uq************ **@TK2MSFTNGP10 .phx.gbl>
| > <E2************ **@cpmsftngxa06 .phx.gbl>
| > | Subject: Re: Client causing remotable application to freeze
| > | Date: Fri, 29 Aug 2003 09:13:38 -0400
| > | Lines: 170
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <#v************ **@tk2msftngp13 .phx.gbl>
| > | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| > | NNTP-Posting-Host: dsl092-093-226.bos1.dsl.sp eakeasy.net 66.92.93.226
| > | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
| > | Xref: cpmsftngxa06.ph x.gbl
| microsoft.publi c.dotnet.langua ges.csharp:1806 27
| > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
| > |
| > | Hi Jeffrey,
| > |
| > | Yes that is basically my problem the way you described it.My first
| > solution
| > | was the one that you suggested (activate the objects from the
| dependencies
| > | constructor). However, when i did that, my application caused itself
to
| > | freeze indefinitely, (in other words, I am attempting to have one
| > remotable
| > | object activate another remotable object and this causes it to
freeze).
| So
| > | in order to solve that, i created a temp client to activate the
objects.
| > To
| > | instantiate the class I am simply calling Activator.GetOb ject() and
then
| > | calling a Ping() method to force the singleton object to instantiate.
If
| > | there is another methods to instantiate a remotable objects within
| another
| > | remotable object perhaps I will try to instantiate the the class from
| > within
| > | the dependency's constructor.
| > |
| > | Thanks for your help!
| > | Tim
| > | "Jeffrey Tan[MSFT]" <v-*****@online.mi crosoft.com> wrote in message
| > | news:E2******** ******@cpmsftng xa06.phx.gbl...
| > | >
| > | > Hi Timothy,
| > | >
| > | > Thank you for your information.
| > | >
| > | > Base on my understanding, your activation mode is server side
sington.
| > | > And your problem seemed related to the class dependency.
| > | > I will simulate your problem:
| > | > You have class A,B,C in server side.
| > | > A has some variables refering instances of B and C, so before
| initialize
| > | > object A, you must
| > | > initialize B and C from client side.
| > | > So you created a temp client and initialize objects as order B C A.
| > | > But during your initialization, if another client connects your
server
| > and
| > | > wants to use object A,
| > | > you application will freeze(Because your objects B and C have not
been
| > | > initialized).
| > | >
| > | > I think the workaround is putting your initialization of objects B
and
| C
| > | in
| > | > the constructor of A, then
| > | > your temp client is no need and the problem will not arise.
| > | >
| > | > If I misunderstand your meanning, please feel free to let me know.
| > | >
| > | > Best regards,
| > | > Jeffrey Tan
| > | > Microsoft Online Partner Support
| > | > Get Secure! - www.microsoft.com/security
| > | > This posting is provided "as is" with no warranties and confers no
| > rights.
| > | >
| > | > --------------------
| > | > | From: "Timothy Shih" <ts***@sensicas t.com>
| > | > | References: <O5************ *@tk2msftngp13. phx.gbl>
| > | > <NE************ **@cpmsftngxa06 .phx.gbl>
| > | > | Subject: Re: Client causing remotable application to freeze
| > | > | Date: Thu, 28 Aug 2003 08:59:44 -0400
| > | > | Lines: 77
| > | > | X-Priority: 3
| > | > | X-MSMail-Priority: Normal
| > | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | > | Message-ID: <uq************ **@TK2MSFTNGP10 .phx.gbl>
| > | > | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| > | > | NNTP-Posting-Host: dsl092-093-226.bos1.dsl.sp eakeasy.net
| 66.92.93.226
| > | > | Path:
cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
| > | > | Xref: cpmsftngxa06.ph x.gbl
| > | microsoft.publi c.dotnet.langua ges.csharp:1802 18
| > | > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
| > | > |
| > | > | Hi Jeffrey,
| > | > |
| > | > | No, I don't get any exception as it just hangs indefinitely.
| > Eventually
| > | I
| > | > | just end the process and restart it. What I do is register the
| > objects,
| > | > but
| > | > | I do not want the client to initialize it. Therefore I spoof a
| client
| > | and
| > | > | ping all the remotable objects on startup so that I can initialize
| > them
| > | in
| > | > | the correct order (one of the objects is necessary for all of the
| > other
| > | > ones
| > | > | to run). Basically, i need to create an instance of each of the
| > objects
| > | > | before an actual client can attempt to access them. However, the
| > problem
| > | > | comes when a client attempts to access the objects as I am
| initalizing
| > | > them
| > | > | (thereby disrupting the order of initialization) . What I would
like
| is
| > | to
| > | > be
| > | > | able to block client access to the objects until I initialize them
| on
| > my
| > | > | end. Thanks!
| > | > |
| > | > | Tim
| > | > | "Jeffrey Tan[MSFT]" <v-*****@online.mi crosoft.com> wrote in
message
| > | > | news:NE******** ******@cpmsftng xa06.phx.gbl...
| > | > | >
| > | > | > Hi Timothy,
| > | > | >
| > | > | > Thank your for posting in this group.
| > | > | >
| > | > | > Do you get any exception from your application?
| > | > | > If you get, please show me the exception.
| > | > | > The remotable objects will not be initialized until your client
| > create
| > | a
| > | > | > instance of it, so what
| > | > | > does your initialize mean?
| > | > | > Is your connection synchronized or asynchronized?
| > | > | >
| > | > | > Best regards,
| > | > | > Jeffrey Tan
| > | > | > Microsoft Online Partner Support
| > | > | > Get Secure! - www.microsoft.com/security
| > | > | > This posting is provided "as is" with no warranties and confers
no
| > | > rights.
| > | > | >
| > | > | > --------------------
| > | > | > | From: "Timothy Shih" <ts***@sensicas t.com>
| > | > | > | Subject: Client causing remotable application to freeze
| > | > | > | Date: Mon, 25 Aug 2003 11:26:00 -0400
| > | > | > | Lines: 17
| > | > | > | X-Priority: 3
| > | > | > | X-MSMail-Priority: Normal
| > | > | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | > | > | Message-ID: <O5************ *@tk2msftngp13. phx.gbl>
| > | > | > | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| > | > | > | NNTP-Posting-Host: dsl092-093-226.bos1.dsl.sp eakeasy.net
| > | 66.92.93.226
| > | > | > | Path:
| > cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
| > | > | > | Xref: cpmsftngxa06.ph x.gbl
| > | > | microsoft.publi c.dotnet.langua ges.csharp:1791 56
| > | > | > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
| > | > | > |
| > | > | > | Hi,
| > | > | > |
| > | > | > | I am having a freezing issue with my application. My
application
| > | > serves
| > | > | > | several remotable objects, all of which must be initialized
| before
| > | > their
| > | > | > | use. Furthermore, some of them depend on each other. On my
| > | application
| > | > | > | startup, I configure the objects usting the
| RemotingConfigu ration
| > | > class
| > | > | to
| > | > | > | load the config file. Then I "ping" each of the objects to
call
| > | their
| > | > | > | constructors. This all works fine if no one is attempting to
| > connect
| > | > at
| > | > | > the
| > | > | > | time, but if a client application attempts to connect to my
| > | > application
| > | > | > | while the startup is happening, both the client and my
| application
| > | > hang
| > | > | > | indefinitely. I am attempting to find a way to block client
| access
| > | to
| > | > | the
| > | > | > | objects before they are initialized, but the channel must
exist
| > for
| > | me
| > | > | to
| > | > | > | initialize them. Any help would be greatly appreciated!
| > | > | > |
| > | > | > | -Tim
| > | > | > |
| > | > | > |
| > | > | > |
| > | > | >
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|

Nov 15 '05 #9

Hi Timothy,

I do not quite undertand why the client class object can not be serialized.
Why the object contains several thread object so it can not be serialized?
I have created a class object whose constructor contains some thread
object,
but I succeeded serialize this class object.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Timothy Shih" <ts***@sensicas t.com>
| References: <O5************ *@tk2msftngp13. phx.gbl>
<NE************ **@cpmsftngxa06 .phx.gbl>
<uq************ **@TK2MSFTNGP10 .phx.gbl>
<E2************ **@cpmsftngxa06 .phx.gbl>
<#v************ **@tk2msftngp13 .phx.gbl>
<8p************ **@cpmsftngxa06 .phx.gbl>
| Subject: Re: Client causing remotable application to freeze
| Date: Fri, 5 Sep 2003 14:35:55 -0400
| Lines: 276
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <un************ *@TK2MSFTNGP11. phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| NNTP-Posting-Host: dsl092-093-226.bos1.dsl.sp eakeasy.net 66.92.93.226
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP11.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1826 76
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
|
| Hi Jeffrey,
|
| Yes, I have resolved the issue, I am able to initialize a remotable object
| through another remotable object. I was attempting to pass a reference to
| the remotable object to a separate class and have that class initialize
it,
| but that led to the freeze. By intializing all remotable objects that a
| given remotable object depends (within that constructor) it does not
matter
| which order the objects are initialized since each one initializes all of
| them. Thanks for your help on this issue, and sorry for not updating you!
|
| In any case, I have encountered a separate problem and I am not sure if
you
| may be of help. In particular, I would like to be notified when an event
| occurs within a remotable objects. However, the object to be notified is
NOT
| remotable, and furthermore, cannot be marked as serializable. This is
| because it contains several threads (System.Threadi ng objects). It seems
| that when I attempt to pass a delegate to the remotable class the compiler
| complains by saying that System.Threadin g is not marked as serializable.
| Essentially, this class handles requests from a network layer such (both
| RS232 and TCP). The remotable class handles requests from a client (over
TCP
| or HTTP). when an event occurs in the remotable class, I would like the
| network object to be notified.
|
| I have attempted to solve the problem by creating a separate
| "SerializableEv entHandler" class which handles events from the remotable
| object and then passes the event down to the network layer, but it still
| complains about the network object not being serializable (essentially I
| added another link to an already broken chain). If you have any way or
idea
| of getting a remotable object to notify a non-remotable, non-serializable
| object of an event (or event making threads serializable!) I would be very
| grateful!
|
| Thanks again,
| Tim
|
| "Jeffrey Tan[MSFT]" <v-*****@online.mi crosoft.com> wrote in message
| news:8p******** ******@cpmsftng xa06.phx.gbl...
| >
| > Hi Timothy,
| >
| > Does your project work?
| > If it still does not work, can you show me more information?
| > I have asked you some questions in last articles, please check it.
| >
| > Thanks
| > Best regards,
| > Jeffrey Tan
| > Microsoft Online Partner Support
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > | From: "Timothy Shih" <ts***@sensicas t.com>
| > | References: <O5************ *@tk2msftngp13. phx.gbl>
| > <NE************ **@cpmsftngxa06 .phx.gbl>
| > <uq************ **@TK2MSFTNGP10 .phx.gbl>
| > <E2************ **@cpmsftngxa06 .phx.gbl>
| > | Subject: Re: Client causing remotable application to freeze
| > | Date: Fri, 29 Aug 2003 09:13:38 -0400
| > | Lines: 170
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <#v************ **@tk2msftngp13 .phx.gbl>
| > | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| > | NNTP-Posting-Host: dsl092-093-226.bos1.dsl.sp eakeasy.net 66.92.93.226
| > | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
| > | Xref: cpmsftngxa06.ph x.gbl
| microsoft.publi c.dotnet.langua ges.csharp:1806 27
| > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
| > |
| > | Hi Jeffrey,
| > |
| > | Yes that is basically my problem the way you described it.My first
| > solution
| > | was the one that you suggested (activate the objects from the
| dependencies
| > | constructor). However, when i did that, my application caused itself
to
| > | freeze indefinitely, (in other words, I am attempting to have one
| > remotable
| > | object activate another remotable object and this causes it to
freeze).
| So
| > | in order to solve that, i created a temp client to activate the
objects.
| > To
| > | instantiate the class I am simply calling Activator.GetOb ject() and
then
| > | calling a Ping() method to force the singleton object to instantiate.
If
| > | there is another methods to instantiate a remotable objects within
| another
| > | remotable object perhaps I will try to instantiate the the class from
| > within
| > | the dependency's constructor.
| > |
| > | Thanks for your help!
| > | Tim
| > | "Jeffrey Tan[MSFT]" <v-*****@online.mi crosoft.com> wrote in message
| > | news:E2******** ******@cpmsftng xa06.phx.gbl...
| > | >
| > | > Hi Timothy,
| > | >
| > | > Thank you for your information.
| > | >
| > | > Base on my understanding, your activation mode is server side
sington.
| > | > And your problem seemed related to the class dependency.
| > | > I will simulate your problem:
| > | > You have class A,B,C in server side.
| > | > A has some variables refering instances of B and C, so before
| initialize
| > | > object A, you must
| > | > initialize B and C from client side.
| > | > So you created a temp client and initialize objects as order B C A.
| > | > But during your initialization, if another client connects your
server
| > and
| > | > wants to use object A,
| > | > you application will freeze(Because your objects B and C have not
been
| > | > initialized).
| > | >
| > | > I think the workaround is putting your initialization of objects B
and
| C
| > | in
| > | > the constructor of A, then
| > | > your temp client is no need and the problem will not arise.
| > | >
| > | > If I misunderstand your meanning, please feel free to let me know.
| > | >
| > | > Best regards,
| > | > Jeffrey Tan
| > | > Microsoft Online Partner Support
| > | > Get Secure! - www.microsoft.com/security
| > | > This posting is provided "as is" with no warranties and confers no
| > rights.
| > | >
| > | > --------------------
| > | > | From: "Timothy Shih" <ts***@sensicas t.com>
| > | > | References: <O5************ *@tk2msftngp13. phx.gbl>
| > | > <NE************ **@cpmsftngxa06 .phx.gbl>
| > | > | Subject: Re: Client causing remotable application to freeze
| > | > | Date: Thu, 28 Aug 2003 08:59:44 -0400
| > | > | Lines: 77
| > | > | X-Priority: 3
| > | > | X-MSMail-Priority: Normal
| > | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | > | Message-ID: <uq************ **@TK2MSFTNGP10 .phx.gbl>
| > | > | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| > | > | NNTP-Posting-Host: dsl092-093-226.bos1.dsl.sp eakeasy.net
| 66.92.93.226
| > | > | Path:
cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
| > | > | Xref: cpmsftngxa06.ph x.gbl
| > | microsoft.publi c.dotnet.langua ges.csharp:1802 18
| > | > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
| > | > |
| > | > | Hi Jeffrey,
| > | > |
| > | > | No, I don't get any exception as it just hangs indefinitely.
| > Eventually
| > | I
| > | > | just end the process and restart it. What I do is register the
| > objects,
| > | > but
| > | > | I do not want the client to initialize it. Therefore I spoof a
| client
| > | and
| > | > | ping all the remotable objects on startup so that I can initialize
| > them
| > | in
| > | > | the correct order (one of the objects is necessary for all of the
| > other
| > | > ones
| > | > | to run). Basically, i need to create an instance of each of the
| > objects
| > | > | before an actual client can attempt to access them. However, the
| > problem
| > | > | comes when a client attempts to access the objects as I am
| initalizing
| > | > them
| > | > | (thereby disrupting the order of initialization) . What I would
like
| is
| > | to
| > | > be
| > | > | able to block client access to the objects until I initialize them
| on
| > my
| > | > | end. Thanks!
| > | > |
| > | > | Tim
| > | > | "Jeffrey Tan[MSFT]" <v-*****@online.mi crosoft.com> wrote in
message
| > | > | news:NE******** ******@cpmsftng xa06.phx.gbl...
| > | > | >
| > | > | > Hi Timothy,
| > | > | >
| > | > | > Thank your for posting in this group.
| > | > | >
| > | > | > Do you get any exception from your application?
| > | > | > If you get, please show me the exception.
| > | > | > The remotable objects will not be initialized until your client
| > create
| > | a
| > | > | > instance of it, so what
| > | > | > does your initialize mean?
| > | > | > Is your connection synchronized or asynchronized?
| > | > | >
| > | > | > Best regards,
| > | > | > Jeffrey Tan
| > | > | > Microsoft Online Partner Support
| > | > | > Get Secure! - www.microsoft.com/security
| > | > | > This posting is provided "as is" with no warranties and confers
no
| > | > rights.
| > | > | >
| > | > | > --------------------
| > | > | > | From: "Timothy Shih" <ts***@sensicas t.com>
| > | > | > | Subject: Client causing remotable application to freeze
| > | > | > | Date: Mon, 25 Aug 2003 11:26:00 -0400
| > | > | > | Lines: 17
| > | > | > | X-Priority: 3
| > | > | > | X-MSMail-Priority: Normal
| > | > | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | > | > | Message-ID: <O5************ *@tk2msftngp13. phx.gbl>
| > | > | > | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| > | > | > | NNTP-Posting-Host: dsl092-093-226.bos1.dsl.sp eakeasy.net
| > | 66.92.93.226
| > | > | > | Path:
| > cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
| > | > | > | Xref: cpmsftngxa06.ph x.gbl
| > | > | microsoft.publi c.dotnet.langua ges.csharp:1791 56
| > | > | > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
| > | > | > |
| > | > | > | Hi,
| > | > | > |
| > | > | > | I am having a freezing issue with my application. My
application
| > | > serves
| > | > | > | several remotable objects, all of which must be initialized
| before
| > | > their
| > | > | > | use. Furthermore, some of them depend on each other. On my
| > | application
| > | > | > | startup, I configure the objects usting the
| RemotingConfigu ration
| > | > class
| > | > | to
| > | > | > | load the config file. Then I "ping" each of the objects to
call
| > | their
| > | > | > | constructors. This all works fine if no one is attempting to
| > connect
| > | > at
| > | > | > the
| > | > | > | time, but if a client application attempts to connect to my
| > | > application
| > | > | > | while the startup is happening, both the client and my
| application
| > | > hang
| > | > | > | indefinitely. I am attempting to find a way to block client
| access
| > | to
| > | > | the
| > | > | > | objects before they are initialized, but the channel must
exist
| > for
| > | me
| > | > | to
| > | > | > | initialize them. Any help would be greatly appreciated!
| > | > | > |
| > | > | > | -Tim
| > | > | > |
| > | > | > |
| > | > | > |
| > | > | >
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|

Nov 15 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

52
5911
by: Dick Moores | last post by:
I need to figure out how to compute pi to base 12, to as many digits as possible. I found this reference, <http://mathworld.wolfram.com/Base.html>, but I really don't understand it well enough. Could someone show me how to do what I need? Thanks, Dick Moores rdm@rcblue.com
12
2966
by: serge calderara | last post by:
Dear all, I have an application which is suppose to start another executable process. As soon as that process is running, I need to retrive its handle. The problem of the particular process I am starting is that it has a welcome window first which gets displayed and then the real windows after a while,in other words it means that the process name is the same, but the handle I need to retrive is the one from the final window and not the...
0
1333
by: Tim Shih | last post by:
Hi all, I'm relatively new to C# .net remoting and was wondering how to access remotable objects on the client side without specifying the url. In particular, I have a server and a client, the client can access the server's objects fine because it knows its url (tcp://ipaddress:port/url). However, there are objects on the clients side which the server needs to call when special events occur. Since i don't know the url of the client, I am...
2
5719
by: Miguel | last post by:
Hi, I'm developing an application in C# with Windows Forms for my company that is similar to the MSN Messenger. This application uses a webservice for registering users, etc... and as 2 webbrowser controls on it. Besides that i'm using the firewall client for isa server 2004 and it seems that the browsers aren't able to pass thru it... if i disable the firewall the browsers work fine, if i don't, the 2 browsers just stay there...
1
1589
by: Jeff Dillon | last post by:
I'm using the webservice I've created: http://www.emergencyreporting.com/ERSWebService/ERSDispatch.asmx When building a client VB.NET app, and adding a web reference to the above file, I see that the client is creating extra methods. For my IncidentOpen method, the client is adding methods like BeginIncidentOpen and EndIncidentOpen. This is not an async web service, is there a corresponding web service setting I need to set so these...
4
1990
by: Nathan | last post by:
I am looking into using web services within a new framework I am putting together and can see the benefit of being able to use a web service to provide access to system by clients. As part of the design I would like to implement the observer pattern from the client so that they do not have to keep querying the web services to see if an update had occurred, rather the web service would advise them. Is this possible with a web service or...
0
1225
by: Geoff Wedig | last post by:
Is it possible to create a DLL (pr on unix a .a, .so, etc) from python code, perhaps using freeze or some other application? Freeze seems to assume that it's creating the main program body, but I don't really understand it well enough to say. If it doesn't work, is there another application that can be used to do this?
2
4733
by: Wimpie van Lingen | last post by:
Hey I have some more questions with regards to Remoting in .NET 2. I'm using TCP with the Binary formatter. My solution consists of 4 projects: - Class Library containing the server classes which Inherits MarshalByRefObject (ok, at this stage it only contains one class... but its gonna grow) - Class Library containing common classes and interfaces that will be shared between all projects. This include interfaces for the server...
3
4687
by: =?Utf-8?B?Y2hlbmRyaWNrcw==?= | last post by:
I have a C# winforms application that makes periodic web service calls in background thread to my web service server. These calls work fine almost all the time but on rare occassions the web service method call will never return and the entire application will freeze, even though the call is being made on its own background thread, not the main UI thread. Does anyone know any reason why a particular web service method call would cause my...
0
9961
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11182
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10886
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10439
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9597
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7148
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6014
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4642
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4245
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.