MapPoint Control in ASP

technohippie
11-12-2002, 12:35 AM
I'm trying to convert an address to a latitude/longitude coordinate within my ASP program.

I have MapPoint 2002 (North America) installed on my server. I've booted it up on the desktop, messed around with it, and it works fine on the desktop.

Here's what I did:

1.
I created a little COM object in VB using some of the functionality from the MapPoint Control (OCX) and some code I found on this site. Basically, my COM object only has one method to convert the address to lat/lon.

2.
I created an ASP page that calls my COM object. The initiation works. It gets past the line:
Set objMP = Server.CreateObject("mydll.myclass")
When I try to run the method that converts the address, it errors out.

I created 2 additional properties in my COM object to show me the error info. I get this:

Err.Description = "MapPoint North America can't run because it is not registered on your system, or it can't be found. Install MapPoint North America and try again."

Err.Number = 16398

Although I'm not certain because I can't step through each line of the COM when it's executing, I believe the error is when I set the NewMap property = 1 (north america)

The North America CD2 is installed. I played around with it on the desktop, everything seems to be there.

Any suggestions? Maybe a different program? I know there's licensing issues with MapPoint 2002, please don't remind me. I'm just trying to get some coordinates.

John Meyer
11-12-2002, 05:59 AM
First thing I would try is running your com object from vbscript at the command line (NOT in ASP). See if it works as it should.

Is the IUSR_ComputerName the user that would be calling the com object in the ASP page? Whatever user it might be, sign in as them and run mappoint. The hang up is probably "that" user has not Agreeed/Disagreed with the EULA?

Anonymous
11-22-2004, 04:25 PM
I've seen this before, try going to start->run and typing:

"C:\Program Files\Microsoft MapPoint\MapPoint.exe" /regserver

If you installed Mappoint to a nondefault location, change the location accordingly. But make sure the path is inside the quotes and the /regserver is outside.

-Jim Keller
http://jim.centerfuse.net/projects/
http://jimkeller.blogspot.com/

 
Web mp2kmag.com
mapforums.com