| View previous topic :: View next topic |
| Author |
Message |
Sam S. Firouz Guest
|
Posted: Fri Apr 21, 2006 9:03 pm Post subject: Synchronize the start of a Service application |
|
|
Hi:
What is the best way to make sure my service application does
not start before the TCP/IP has started and the machine has a
valid IP address (The IP address is coming from DHCP server).
Thank you
Sam |
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Fri Apr 21, 2006 10:03 pm Post subject: Re: Synchronize the start of a Service application |
|
|
"Sam S. Firouz" <sfirouz (AT) comcast (DOT) net> wrote in message
news:44494386$1 (AT) newsgroups (DOT) borland.com...
| Quote: | What is the best way to make sure my service application does
not start before the TCP/IP has started and the machine has a
valid IP address (The IP address is coming from DHCP server).
|
There isn't any. Your service will just have to periodically query the
current IP and ignore it if it is not valid.
Gambit |
|
| Back to top |
|
 |
Vladimir Stefanovic Guest
|
Posted: Sat Apr 22, 2006 10:03 am Post subject: Re: Synchronize the start of a Service application |
|
|
| Quote: | What is the best way to make sure my service application
does not start before the TCP/IP has started and the machine
has a valid IP address (The IP address is coming from DHCP
server).
|
Why you are bothering of such scenario? It's prety common
situation that server cannot respond, because it's not found
or something similar. In client/server architecture it's easy and
safe to catch the non-listening server event, and such case must
be designed on client side.
--
Best Regards,
Vladimir Stefanovic |
|
| Back to top |
|
 |
Sam S. Firouz Guest
|
Posted: Mon Apr 24, 2006 10:03 pm Post subject: Re: Synchronize the start of a Service application |
|
|
Is there at lease any way to make my service dependant on DHCP service?
Thank You
Sam
"Remy Lebeau \(TeamB\)" <no.spam (AT) no (DOT) spam.com> wrote:
| Quote: | There isn't any. Your service will just have to periodically query the
current IP and ignore it if it is not valid.
Gambit
|
|
|
| Back to top |
|
 |
Sam S. Firouz Guest
|
Posted: Mon Apr 24, 2006 10:03 pm Post subject: Re: Synchronize the start of a Service application |
|
|
My service is the server and needs to access some file on the network drive.
Thank you
Sam
"Vladimir Stefanovic" <antivari (AT) po (DOT) sbb.co.yu> wrote:
| Quote: |
Why you are bothering of such scenario? It's prety common
situation that server cannot respond, because it's not found
or something similar. In client/server architecture it's easy and
safe to catch the non-listening server event, and such case must
be designed on client side.
--
Best Regards,
Vladimir Stefanovic
|
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Mon Apr 24, 2006 11:03 pm Post subject: Re: Synchronize the start of a Service application |
|
|
"Sam S. Firouz" <sfirouz (AT) comcast (DOT) net> wrote in message
news:444d3e57$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Is there at lease any way to make my service dependant on DHCP service?
|
Sure, simply include the DHCP service in the TService's Dependancies
collection. Of course, that only ensures that the DHCP service is running,
but it does not ensure that an IP will be available right away. So you
still need to write your socket code to expect that condition regardless.
Gambit |
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Mon Apr 24, 2006 11:03 pm Post subject: Re: Synchronize the start of a Service application |
|
|
"Sam S. Firouz" <sfirouz (AT) comcast (DOT) net> wrote in message
news:444d3ea2$1 (AT) newsgroups (DOT) borland.com...
| Quote: | My service is the server and needs to access some file on the network
drive. |
You do know that services DO NOT have access to network resources by
default, right? Are you configuring your service to run with a user account
that has netowkr access? If not, then you need to do so.
Gambit |
|
| Back to top |
|
 |
Sam S. Firouz Guest
|
Posted: Tue Apr 25, 2006 8:03 pm Post subject: Re: Synchronize the start of a Service application |
|
|
Yes, I had learned this the hard way few years back.
Thanks for the reminder anyway.
Thank you
Sam
"Remy Lebeau \(TeamB\)" <no.spam (AT) no (DOT) spam.com> wrote:
| Quote: |
"Sam S. Firouz" <sfirouz (AT) comcast (DOT) net> wrote in message
news:444d3ea2$1 (AT) newsgroups (DOT) borland.com...
You do know that services DO NOT have access to network resources by
default, right? Are you configuring your service to run with a user account
that has netowkr access? If not, then you need to do so.
Gambit
|
|
|
| Back to top |
|
 |
|