Static methods can not be called remotely
The client application can not access to static methods/properties/fields remotely. since you access a static method using classname. staticmethod, instead of objref. staticmethod, there's no proxy involved. so access to static methods always takes place in the client's context.
But you can add a thin non-static wrapper around und each static method in order to remote calling.
Take the following code snippet as an example:
Public class myclass: marshalbyrefobject
{
Public static void dosomething (...) // can not be called remotely
{
...
}
Public void dosomethingwrapper (...) // can be called remotely
{
Dosomething (...);
}
}
Refer to the articles as follows to get more information:
1. in-depth exploration of the. NET remoting infrastructure,
Http://www.cnblogs.com/rickie/archive/2004/10/22/55292.html
2. Several Problems with remotingsqlhelper,
Http://www.cnblogs.com/rickie/archive/2004/10/13/51500.html