PDA

View Full Version : RPC Server is unavailable



BobFromBoston
12-28-2005, 09:59 AM
Greetings,

MapPoint throws an exception:

The RPC Server is unavailable at MapPoint.Pushpin.Delete()

The code normally works, but on rare occassion, throws this exception. So I'm trying to understand the condition which causes it, and how to fix it.

When the processor is under load, Windows pops up the "Server Busy" message box. Could that be the problem?

Thanks for the help. I had asked a related question months ago, but never got it fixed.


Thanks,
Bob

Wilfried
12-28-2005, 02:37 PM
Hi Bob,

If your application is busy with lengty things you get the server busy message. Only solution is to optimize your code for speed, or execute the lengthy things in a background thread.

BobFromBoston
12-28-2005, 03:10 PM
Wilfried,

Could this threading contention problem also be the cause of my
"The RPC server is unavailable" exception?

Thanks for the help,
Bob

Wilfried
12-29-2005, 01:20 PM
Hi Bob,

I hope this will help:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q224370

But the hell what is RPC ? If they should tell then it is probably easy. but anyway check the service.

kvansickle
04-19-2006, 08:03 AM
I have a C# application that references the MapPoint object model. I am using the Application object and not the MapPointControl object. This program was periodically generating an RPC Server exception.

The program opens a base map, reads several thousand records from a database table, and places pushpins on the base map corresponding to lat/lon values read from the database table. It then zooms to different locations, queries the pushpin records within the current view to get a count, and creates web pages for each of the locations. I set up a system timer to repeat the process at a user selected interval.

Initially I opened the base map when the program loaded and kept it open until the program exited. I would create my pushpin dataset every time the timer event fired and delete it when I was finished processing each iteration.

Sometimes the program would generate the RPC Server exception on the first iteration (timer event). Other times it would run fine for a dozen or so iterations and then generate the exception. I considered the possibility that one iteration may not be finished processing when it was time for the next iteration to start. However, I created a Monitor to avoid this. I also set the timer interval to a point where I was certain that this was not happening and I still periodically got the exception.

I changed my code so that it initializes the MapPoint.Application object and opens the base map every time the timer event fires. When I am finished processing the data for each iteration, I use the MapPoint.Application.Quit() function and then set the Application object and Map object to null. I know that this is probably not the most efficient technique but I have not seen the RPC server error since I made this change.

I realize that this reply is probably too late to help the original poster but I hope it can help someone in the future.

Wilfried
04-20-2006, 03:35 PM
Hi,

thans for this feedback. It will benefit other users !