E
eusebiu
Hello...
I am implementing .NET remoting with a WebService as client. All works
fine the first time, but when I call again the method from WS that
gets the remote object and calls a remote method, I don`t get into the
method(I've put a breakpoint in it... and it stops only the first
time...).
The second time I get to this line... and ... it stops... no
exeption.. no nothing..
remoteObject.Test();
where
remoteObject = Activator.GetObject(typeof(Remotable), location) as
Remotable;
I`ve implemented a Singleton pattern for a Class in WS like this :
interface ISingleton
{ void Test(); }
internal class Singleton : ISingleton
{
Singleton(){}
public static Singleton Instance
{
get
{
return Nested.instance;
}
}
class Nested
{
internal static readonly Singleton instance = new
Singleton();
}
public void Test()
{//call the remote method... }
}
public class WebService : System.Web.Services.WebService, ISingleton
{
public PixelWebService()
{
InitializeComponent();
}
[WebMethod]
public void Test()
{
Singleton.Instance.Test();
}
}
when calling the WS, I make :
WebService service = new WebService();
service.Test();
Can someone help me?
Thanks
I am implementing .NET remoting with a WebService as client. All works
fine the first time, but when I call again the method from WS that
gets the remote object and calls a remote method, I don`t get into the
method(I've put a breakpoint in it... and it stops only the first
time...).
The second time I get to this line... and ... it stops... no
exeption.. no nothing..
remoteObject.Test();
where
remoteObject = Activator.GetObject(typeof(Remotable), location) as
Remotable;
I`ve implemented a Singleton pattern for a Class in WS like this :
interface ISingleton
{ void Test(); }
internal class Singleton : ISingleton
{
Singleton(){}
public static Singleton Instance
{
get
{
return Nested.instance;
}
}
class Nested
{
internal static readonly Singleton instance = new
Singleton();
}
public void Test()
{//call the remote method... }
}
public class WebService : System.Web.Services.WebService, ISingleton
{
public PixelWebService()
{
InitializeComponent();
}
[WebMethod]
public void Test()
{
Singleton.Instance.Test();
}
}
when calling the WS, I make :
WebService service = new WebService();
service.Test();
Can someone help me?
Thanks