Community of MapPoint and Virtual Earth Users and Developers
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 ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Server Busy in MapPoint Control with vb.NET 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 |
| |||
| 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. |
| |||
|
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 |
| |||
| 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. |
| |||
| 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 |
| |||
|
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 |
![]() |
| Tags |
| busy, control, mappoint, server, vbnet |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Server is Busy | Anonymous | MapPoint 2006/2009 Discussion | 4 | 01-18-2005 03:52 AM |
| server busy problem! | Anonymous | MapPoint 2006/2009 Discussion | 8 | 01-02-2005 03:04 AM |
| Server Busy | Sylvain | MapPoint 2006/2009 Discussion | 21 | 09-18-2004 04:25 PM |
| Timer and Server Busy | Anonymous | MapPoint 2006/2009 Discussion | 0 | 07-07-2004 02:59 AM |
| Server Busy Timeout | Ninjas | MapPoint 2006/2009 Discussion | 1 | 01-13-2004 10:35 PM |
Taba Heights Holiday
Visit Egypt with your Taba Heights holiday. Book through UlookUbook and save!