Strange remoting issue
-
I have a client form that uses a remote object 'RemoteDataManager ' as follows: RemoteDataManager r = new RemoteDataManager(); r.Test(); This works correctly, Test is executed like it should. However, this method takes a while to complete, so I'd like to make it a asynchronous call. So I tried: RemoteDataManager r = new RemoteDataManager(); AsyncCallback RemoteCallback = new AsyncCallback(OurRemoteAsyncCallBack); TestDelegate RemoteDel = new TestDelegate(r.Test); IAsyncResult iar = RemoteDel.BeginInvoke(RemoteCallback, null); This runs, but the Test method is never executed! I don't know where to look for... does anyone have a clue? Kind regards, Ludwig
-
I have a client form that uses a remote object 'RemoteDataManager ' as follows: RemoteDataManager r = new RemoteDataManager(); r.Test(); This works correctly, Test is executed like it should. However, this method takes a while to complete, so I'd like to make it a asynchronous call. So I tried: RemoteDataManager r = new RemoteDataManager(); AsyncCallback RemoteCallback = new AsyncCallback(OurRemoteAsyncCallBack); TestDelegate RemoteDel = new TestDelegate(r.Test); IAsyncResult iar = RemoteDel.BeginInvoke(RemoteCallback, null); This runs, but the Test method is never executed! I don't know where to look for... does anyone have a clue? Kind regards, Ludwig
If you're using .NET 1.1 and catching exceptions, it's possible you might have the same problem discussed earlier here[^]. Stepping through your code in the debugger might shed some light on your problem, too, because from what little you provided all I can say is that your code looks fine.
Microsoft MVP, Visual C# My Articles
-
If you're using .NET 1.1 and catching exceptions, it's possible you might have the same problem discussed earlier here[^]. Stepping through your code in the debugger might shed some light on your problem, too, because from what little you provided all I can say is that your code looks fine.
Microsoft MVP, Visual C# My Articles
Hi, After two days I found out why it didn't work. Originally my config file contained: I changed it into: and all of a sudden the methods was also called asynchronously. I still don't know why, but it works now. For your information, I wanted to use asynchronous calls because my remote method lasted 10 minutes to complete. I ran into another issue however, and I want to mention it here because it took me a while to find a solution. After 2 minutes or so, the thread was aborted on the server and my callback method was never called (the method was executed correctly though). So it worked, but I never got callback because the server thread ended. I solved this by dynamically increasing the script timeout that IIS uses: System.Web.HttpContext.Current.Server.ScriptTimeout = 1800; Now it works... but it was hard to find the solution :((
-
Hi, After two days I found out why it didn't work. Originally my config file contained: I changed it into: and all of a sudden the methods was also called asynchronously. I still don't know why, but it works now. For your information, I wanted to use asynchronous calls because my remote method lasted 10 minutes to complete. I ran into another issue however, and I want to mention it here because it took me a while to find a solution. After 2 minutes or so, the thread was aborted on the server and my callback method was never called (the method was executed correctly though). So it worked, but I never got callback because the server thread ended. I solved this by dynamically increasing the script timeout that IIS uses: System.Web.HttpContext.Current.Server.ScriptTimeout = 1800; Now it works... but it was hard to find the solution :((
You realize that when you put the < and > characters into an HTML input field that they won't show up, right? Your XML for your .config file isn't visible. Please click "modify" on the bottom of your message and either escape these characters or click the "Do not treat <'s as HTML tags" check box right below the posting textarea. Note that any tags you use (like the <code> tag you put your last line between) will be escaped as well, so you'd best remove them.
Microsoft MVP, Visual C# My Articles
-
You realize that when you put the < and > characters into an HTML input field that they won't show up, right? Your XML for your .config file isn't visible. Please click "modify" on the bottom of your message and either escape these characters or click the "Do not treat <'s as HTML tags" check box right below the posting textarea. Note that any tags you use (like the <code> tag you put your last line between) will be escaped as well, so you'd best remove them.
Microsoft MVP, Visual C# My Articles