Groups | Blog | Home
all groups > dotnet remoting > october 2006 >

dotnet remoting : Problem with windows service



Kim Johnson
10/18/2006 2:24:22 PM
Check the EventViewer for your application - it might show that an exception
has been thrown. If a FileNotFoundException is occurring, it probably can
find your class library because the working directory for the service is
always the windows\system directory (which you can easily reset in code).

Kim

Fernando
10/18/2006 5:03:23 PM
if i create a windows service and register a class that is not part of the
service project (it is part of a classlibrary project), when i start de
service an error message says that can not start the service becouse there
is nothing to do.
If i do the same thing with a console app, it works fine.


I am registering the class like this:
RemotingConfiguration.RegisterWellKnownServiceType(GetType(ClassLibrary1.Class2),
"Class2", WellKnownObjectMode.SingleCall)

The Classe1 inherits MarshalByRefObject

Any tips?
Tks



Kim Johnson
10/19/2006 8:02:48 AM
I guess it might depend on what file can't be found...

You might try using an app.config to set the probing path, or even putting
dependent assemblies in the GAC. Maybe also check if you're expecting
specific versions - that is something new in VS2005 - if the correct
assembly version isn't found at run time you'd get an error. One more thing
to try would be to use the Fusion Log Viewer to log binding failures.

Kim

Fernando
10/19/2006 9:02:41 AM
Kim, tanks for your feedback.

This erros FileNotFoundException is realy occuring, but if i change the
working diretcory it still occurring!
I'm using .NET 2.0. I had made a test with an similar app with VS 2003 and
have no problem at all!!

Do you have any ideia what can be?

Tanks

"Kim Johnson" <k_r_j@sbcglobal.net> escreveu na mensagem
news:euQMMvv8GHA.4012@TK2MSFTNGP04.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button