Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 9 of 9

Server Busy in MapPoint Control with vb.NET

This is a discussion on Server Busy in MapPoint Control with vb.NET within the MapPoint Desktop Discussion forums, part of the Map Forums category; My MapPoint control in my vb.net Windows application produces a Server Busy, Retry or Switch dialog box during longer processing ...

  1. #1
    Aschultz13 is offline Junior Member White Belt
    Join Date
    Jun 2003
    Posts
    1

    Server Busy in MapPoint Control with vb.NET

    My MapPoint control in my vb.net Windows application produces a Server Busy, Retry or Switch dialog box during longer processing times. How can I increase the timeout property?

    I've read all day about what could be causing this. An article in MSDN says, "The default values of the Visual Basic OLERequestPendingTimeout and OLEServerBusyTimeout properties are 5 and 10 seconds, respectively. Certain methods in the MapPoint object model may require longer processing time... To avoid this problem, you can set the Visual Basic properties to higher values for the entire project or only for the MapPoint function that might take a longer amount of time. The following code sets the Visual Basic properties to 50 and 100 seconds:

    App.OLERequestPendingTimeout = 10 * App.OLERequestPendingTimeout
    App.OLEServerBusyTimeout = 10 * App.PLEServerBusyTimeout"

    I found the above quote at http://msdn.microsoft.com/library/de...ingStarted.asp

    The problem is that these properties have "no equivalent" in .NET according to MSDN (at http://msdn.microsoft.com/library/de...albasicnet.asp)

    Does anyone know how I could get these server messages to disappear?

    Thanks,
    Amy

  2. #2
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    About the Server busy message

    One thing that causes this is if your application crashed previously and you started it again and loaded a MapPoint instance again. If this should be the case, try eliminating any instance of MP stuck in the task manager before running your app again. If this is not the case, then another common cause is if you are shifting focus in your application to other controls or if you switch windows when the extended processing is being carried out. Try to keep focus on the app window during the processing to avoid this. I use a progress bar to give some feedback and to avoid this server busy dialog when doing some heavy processing with MP. Hope this helps you.

  3. #3
    douglas is offline Junior Member White Belt
    Join Date
    May 2003
    Posts
    7
    Thanks for the info. I have encountered this problem too. This will help when running mappoint interactively...but I also get this message when my vb.net app uses the mappoint control. Do you know if there is a way to detect whether, as you write, "...any instance of MP stuck in the task manager.." from within my .net app? I know I can check for my form's existence....but sometimes my form (the one with the mappoint control) has previously been closed and the error still occurs.

    thanks

  4. #4
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    How to detect MapPoint process

    douglas, what I do in those cases is use a small routine that detects whether there is an MP process currently running, and if it is, then I programmatically close it. This has one catch though: it will close all MP processes, this means that if you have a MP window open because you separately opened it to use it yourself, not a program, then it wil try to close it. I think some fine tuning of the method could solve this problem, but it should work for most scenarios:


    Private Sub KillMapPointProcess()
    Dim proc As New Process()
    Dim procs As Process()
    Dim i As Integer
    procs = proc.GetProcessesByName("MapPoint")
    If procs.Length = 0 Then Return 'MP wasn't loaded, so return
    For i = 0 To UBound(procs)
    procs(i).Kill()
    procs(i).WaitForExit()
    Next
    End Sub


    Basically what this does is to get a list of all the running processes that are called "MapPoint", and for each and every one of them, it starts closing them. It does so with all processes because at that point you wouldn't have a way to determine which one is the stuck one (I think).
    Let me know if it works.

  5. #5
    douglas is offline Junior Member White Belt
    Join Date
    May 2003
    Posts
    7
    Thanks!

    This will work perfectly for me.

    regards, Douglas

  6. #6
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Thanks - Server Busy

    I was shifting focus to other controls in my application. Your information was very helpful. Thanks!

    Amy

  7. #7
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

  8. #8
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    I THINK I FOUND A SOLUTION !!!

    This is my solution for the "Server busy" bug in MapPoint2004
    but, you got to recompile your own MFC42.DLL.....

    Juste modify [list=1]

    In :

    COleMessageFilter::COleMessageFilter()

    Replace :

    m_nRetryReply = 10000; // default is 10 sec
    m_nTimeout = 8000; // default is 8 sec

    with :

    m_nRetryReply = 120000; // FC : Workaround = 120 sec
    m_nTimeout = 1000; // FC : Workaround = 1 sec

    and...
    in :

    STDMETHODIMP_(DWORD) COleMessageFilter::XMessageFilter::MessagePending(
    HTASK htaskCallee, DWORD dwTickCount, DWORD )


    replace :

    // show not responding dialog
    pThis->OnNotRespondingDialog(htaskCallee);
    pThis->m_bUnblocking = FALSE;

    With :

    pThis->m_bUnblocking = FALSE; // FC : Workaround
    return PENDINGMSG_CANCELCALL; // FC : Workaround


    Rebuild MFC42.DLL

    put your new MFC42.DLL in Mappoint.exe directory...

    That's all folks....

    Fabrice

  9. #9
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Since i can't re-compile the MFC42.DLL do you mind e-mailing the modified version to spatial.softwhere@btinternet.com

    I would like to see if it fixes some of the OLE Timeout issues.

    Kind Regards,

    Ian

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Server Busy
    By Sylvain in forum MapPoint Desktop Discussion
    Replies: 22
    Last Post: 05-07-2014, 07:28 PM
  2. Server is Busy
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 01-18-2005, 04:52 AM
  3. server busy problem!
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 8
    Last Post: 01-02-2005, 04:04 AM
  4. Timer and Server Busy
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 07-07-2004, 03:59 AM
  5. Server Busy Timeout
    By Ninjas in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 01-13-2004, 11:35 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27