Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Strange remoting issue

Strange remoting issue

Scheduled Pinned Locked Moved C#
helpquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lustuyck
    wrote on last edited by
    #1

    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

    H 1 Reply Last reply
    0
    • L lustuyck

      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

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      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

      L 1 Reply Last reply
      0
      • H Heath Stewart

        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

        L Offline
        L Offline
        lustuyck
        wrote on last edited by
        #3

        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 :((

        H 1 Reply Last reply
        0
        • L lustuyck

          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 :((

          H Offline
          H Offline
          Heath Stewart
          wrote on last edited by
          #4

          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

          L 1 Reply Last reply
          0
          • H Heath Stewart

            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

            L Offline
            L Offline
            lustuyck
            wrote on last edited by
            #5

            Already changed that.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups