473,507 Members | 9,611 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Windows services problem

Hello everybody, I have problem using Windows Services.
I want to host a server application on in a windows service and I'm
not able to do that. In effect when I try to start the service I
receive an error that says something like that: "The ServerCrypto
service on the local computer has been started and then stopped. Some
services stop automatically if there aren't operation to execute, for
example ........ " (I hope this is correct I tried to translate the
italian message that I received). I'm not an expert of windows
services (in effect up to now I used the IIs to host remote server but
now I cannot do that:-( ) and so I'm not able to understand where can
be my error... the thing that I don't understand is why I receive the
same error message when I try the code proposed by Ingo Rammer in his
book.... do you have some indication?

--
My Email is correct

Inviato da www.mynewsgate.net
Nov 16 '05 #1
8 1243
Giox,

Chances are that an exception is being thrown somewhere and killing the
service process. You should probably set up some sort of catch (around your
entry point) for any exceptions and then log it to a file, and see what you
get.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Giox" <gi*************@yahoo.it> wrote in message
news:20****************@mynewsgate.net...
Hello everybody, I have problem using Windows Services.
I want to host a server application on in a windows service and I'm
not able to do that. In effect when I try to start the service I
receive an error that says something like that: "The ServerCrypto
service on the local computer has been started and then stopped. Some
services stop automatically if there aren't operation to execute, for
example ........ " (I hope this is correct I tried to translate the
italian message that I received). I'm not an expert of windows
services (in effect up to now I used the IIs to host remote server but
now I cannot do that:-( ) and so I'm not able to understand where can
be my error... the thing that I don't understand is why I receive the
same error message when I try the code proposed by Ingo Rammer in his
book.... do you have some indication?

--
My Email is correct

Inviato da www.mynewsgate.net

Nov 16 '05 #2
Ok
I will try to do that, but can you confirm the following idea? is it
true that if I create a windows service that's working perfecly, it
cannot stop himself? I have this doubt watching at the win service of
Ingo Rammer (framework 1.0) that stops itself. May be this is a
compatibility issue between the frameworks?
Searching on google I got only few examples of remoting on windows
services and all of them are referred to framework 1.0 :-(
Thanks Giox

Nicholas Paldino [.NET/C# MVP] <mv*@spam.guard.caspershouse.com> ha
scritto:
Giox,

Chances are that an exception is being thrown somewhere and killing the service process. You should probably set up some sort of catch (around your entry point) for any exceptions and then log it to a file, and see what you get.

Hope this helps.

--
My Email is correct

Inviato da www.mynewsgate.net
Nov 16 '05 #3
Giox,

I don't see why a service can't stop itself. I mean, you could just
exit the program, and it won't be running anymore. That doesn't mean that
it was a clean shutdown, but it definitely would have stopped if the program
terminated in some way.

As for a compatability issue between the frameworks, if you upgraded the
runtime from a previous version, then it shouldn't be ^THAT^ much of an
issue, but it definitely could be.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Giox" <gi*************@yahoo.it> wrote in message
news:20****************@mynewsgate.net...
Ok
I will try to do that, but can you confirm the following idea? is it
true that if I create a windows service that's working perfecly, it
cannot stop himself? I have this doubt watching at the win service of
Ingo Rammer (framework 1.0) that stops itself. May be this is a
compatibility issue between the frameworks?
Searching on google I got only few examples of remoting on windows
services and all of them are referred to framework 1.0 :-(
Thanks Giox

Nicholas Paldino [.NET/C# MVP] <mv*@spam.guard.caspershouse.com> ha
scritto:
Giox,

Chances are that an exception is being thrown somewhere and

killing the
service process. You should probably set up some sort of catch

(around your
entry point) for any exceptions and then log it to a file, and see

what you
get.

Hope this helps.

--
My Email is correct

Inviato da www.mynewsgate.net

Nov 16 '05 #4
Sorry my English is orrible, in the previous mail my question was "is it
possible that automatically after a certain time interval the service stop
itself without any external instruction", because the error that I receive
seems to say that .... (in effect i wrote a different question I beg pardon)
For the framework I think that's not this the problem cause also the example
in the Advanced .net remoting has the same problem but in the websites I
didn't find any correction to this code.
Thanks again and sorry for my English :-)

Nicholas Paldino [.NET/C# MVP] <mv*@spam.guard.caspershouse.com> ha scritto:
Giox,

I don't see why a service can't stop itself. I mean, you could just
exit the program, and it won't be running anymore. That doesn't mean that
it was a clean shutdown, but it definitely would have stopped if the program terminated in some way.

As for a compatability issue between the frameworks, if you upgraded the runtime from a previous version, then it shouldn't be ^THAT^ much of an
issue, but it definitely could be.

--
My Email is correct

Inviato da www.mynewsgate.net
Nov 16 '05 #5
Giox,

You could do that, but I would advise against it. Rather, I would just
make it do nothing during the periods of time that you don't want it to
operate.

What are you doing in the service? You mentioned remoting. What gives
you the idea that there is something in there that is causing the problem?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Giox" <gi*************@yahoo.it> wrote in message
news:20****************@mynewsgate.net...
Sorry my English is orrible, in the previous mail my question was "is it
possible that automatically after a certain time interval the service stop
itself without any external instruction", because the error that I receive
seems to say that .... (in effect i wrote a different question I beg
pardon)
For the framework I think that's not this the problem cause also the
example
in the Advanced .net remoting has the same problem but in the websites I
didn't find any correction to this code.
Thanks again and sorry for my English :-)

Nicholas Paldino [.NET/C# MVP] <mv*@spam.guard.caspershouse.com> ha
scritto:
Giox,

I don't see why a service can't stop itself. I mean, you could just
exit the program, and it won't be running anymore. That doesn't mean
that
it was a clean shutdown, but it definitely would have stopped if the

program
terminated in some way.

As for a compatability issue between the frameworks, if you upgraded

the
runtime from a previous version, then it shouldn't be ^THAT^ much of an
issue, but it definitely could be.

--
My Email is correct

Inviato da www.mynewsgate.net

Nov 16 '05 #6
I think that there is something else that create me some kind of problems
cause testing the code as consolle application I have no problem and when I
try to implement it as service I try to follow the idea of MSDN.... but
tonight I will try to write some log, and if I will find some error I will
post another time new questions. Thanks a lot Nicholas

Nicholas Paldino [.NET/C# MVP] <mv*@spam.guard.caspershouse.com> ha scritto:
Giox,

You could do that, but I would advise against it. Rather, I would just
make it do nothing during the periods of time that you don't want it to
operate.

What are you doing in the service? You mentioned remoting. What gives
you the idea that there is something in there that is causing the problem?

--
My Email is correct

Inviato da www.mynewsgate.net
Nov 16 '05 #7
Giox,

What is the account that you are running the service under? If you are
exposing objects through remoting, and you have it run as the LocalSystem
account, then it should fail, because the account doesn't have network
access. Rather, have it run under the NetworkService account, and it should
have network rights.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Giox" <gi*************@yahoo.it> wrote in message
news:20****************@mynewsgate.net...
I think that there is something else that create me some kind of problems
cause testing the code as consolle application I have no problem and when
I
try to implement it as service I try to follow the idea of MSDN.... but
tonight I will try to write some log, and if I will find some error I will
post another time new questions. Thanks a lot Nicholas

Nicholas Paldino [.NET/C# MVP] <mv*@spam.guard.caspershouse.com> ha
scritto:
Giox,

You could do that, but I would advise against it. Rather, I would
just
make it do nothing during the periods of time that you don't want it to
operate.

What are you doing in the service? You mentioned remoting. What
gives
you the idea that there is something in there that is causing the
problem?

--
My Email is correct

Inviato da www.mynewsgate.net

Nov 16 '05 #8
Thanks, this is my principal error (but not the only one....)
Now it works!
Thanks a lot Giox

Nicholas Paldino [.NET/C# MVP] <mv*@spam.guard.caspershouse.com> ha scritto:
Giox,

What is the account that you are running the service under? If you are
exposing objects through remoting, and you have it run as the LocalSystem
account, then it should fail, because the account doesn't have network
access. Rather, have it run under the NetworkService account, and it should
have network rights.

--
My Email is correct

Inviato da www.mynewsgate.net
Nov 16 '05 #9

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

Similar topics

0
2876
by: Stefan Hinz | last post by:
Degan, jumping in to try and solve some problems that look pretty obvious to me ... > #options for default service (mysqld2) > (mysqld2) It should be , not (mysqld2).
8
4164
by: Bill Sonia | last post by:
I've written a Windows Service to send e-mails on events like OnStart, OnStop, OnShutDown using System.Web.Mail. It works for everything but OnShutdown. My guess is that for OnShutDown, once my...
3
4378
by: Jacob Crossley | last post by:
Hello all. We have about 10 Window's services that we wrote in c#. We use them to process row's that we have queued up in various SQL tables. The services seem to hang at least once in any given...
14
4893
by: Brian Keating EI9FXB | last post by:
I wonder can anyone reccomment a solution to this problem. Let me explain, I've services running on my system, my application receives diagnostic messages from these services, what i want to do...
0
2286
by: CESAR DE LA TORRE [MVP] | last post by:
I am using WSE 3.0 with Visual Studio 2005, specifically I'm using Kerberos authentication and passing Kerberos ticket from Presentation Tier (VSTO.2005 client) to Server Tier through our Web...
27
4687
by: pisquem | last post by:
I am building an windows service that is to be deployed on a windows server 2003 and I want to have activity written to the event log, I want its own log called ('CustomLog') Below is what I...
15
2398
by: =?Utf-8?B?RWxpb3Ro?= | last post by:
I try to install Windows Services but it show this error during the installation process, "Insufficient System resources exist to complete the requested service." I created this Services in VB...
5
2284
by: =?Utf-8?B?dmlzaHJ1dGg=?= | last post by:
This code works fine in Windows Application. In Windows Application, I am able to zip the image files properly and it totally contains 900MB My problem is the same code which I used in my Windows...
5
3270
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name?...
0
7110
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7314
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,...
0
7372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7030
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...
0
7482
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...
1
5041
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
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...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.