MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Server Busy in MapPoint Control with vb.NET

This is a discussion on Server Busy in MapPoint Control with vb.NET within the MapPoint 2006/2009 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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-09-2003
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 06-09-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 06-10-2003
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 06-11-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 06-12-2003
Junior Member
White Belt
 
Join Date: May 2003
Posts: 7
Thanks!

This will work perfectly for me.

regards, Douglas
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 06-12-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Thanks - Server Busy

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

Amy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 06-12-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
My pleasure.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 02-20-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9 (permalink)  
Old 02-20-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
busy, control, mappoint, server, vbnet


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Server is Busy Anonymous MapPoint 2006/2009 Discussion 4 01-18-2005 04:52 AM
server busy problem! Anonymous MapPoint 2006/2009 Discussion 8 01-02-2005 04:04 AM
Server Busy Sylvain MapPoint 2006/2009 Discussion 21 09-18-2004 05:25 PM
Timer and Server Busy Anonymous MapPoint 2006/2009 Discussion 0 07-07-2004 03:59 AM
Server Busy Timeout Ninjas MapPoint 2006/2009 Discussion 1 01-13-2004 11:35 PM


All times are GMT -5. The time now is 04:19 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54