View Full Version : VB.NET webForm + MapPoint 2002 problem

11-29-2002, 04:42 PM
I am building a VB.NET webForm application that needs to use the MapPoint application object (as opposed to the MapPoint Control).

I receive an exception the first time I try to access the com object, in the following code:

Dim objApplication As New Application()

The exception I get is at the bottom of this email. It indicates that the ASPNET account does not have the rights to access this ‘resource’. I checked the permissions on the com .dll (which is located in progfiles\mappoint) and it allows all users Read and Execute. I checked the interop.dll (in my \bin) that my project created to interface with this com object, and again the permissions are Read and Execute.

Anyone have suggestions where to look next?


Server Error in '/Display_Mappoint' Application.


Access is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access is denied.

The ASP.NET process is not authorized to access the requested resource. For security reasons the default ASP.NET process identity is '{machinename}\ASPNET', which has limited privileges. Consider granting access rights to the resource to the ASP.NET process identity.

To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the "{machinename}\ASPNET" user. Highlight the ASP.NET account, and check the Write box in the Allow column.

Source Error:

Line 114:
Line 115: Catch ex As Exception
Line 116: Throw ex
Line 117:
Line 118: Finally

Source File: c:\inetpub\wwwroot\Display_Mappoint\Display_MapPoi nt.aspx.vb Line: 116

Stack Trace:

[UnauthorizedAccessException: Access is denied.]
Display_Mappoint.Display_MapPoint.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\Display_Mappoint\Display_MapPoi nt.aspx.vb:116
System.Web.UI.Control.OnLoad(EventArgs e)


Version Information: Microsoft .NET Framework Version:1.0.3705.209;

John Meyer
12-05-2002, 08:35 PM
You have IIS permissions as well as NTFS permissions. Check both..

12-23-2002, 10:51 AM
I got the exactly same problem.
Any body have idea?

12-31-2002, 03:41 PM
come back with some more debuggin information like what account you are working under. its probably aspnet. You have to give your application the permission to launch a DCOM server. Also giving aspnet some more access rights would be nice. I also think if you are working with an asp page you should set your IIS project to run in isolated mode it then has its own memory.

to debug your application

goto run and open up eventvwr

02-20-2003, 09:25 AM
I've seen a message almost identical to this one and it was due to the fact that the registry settings for the object, in your case MapPoint, weren't set to allow ASP.NET read rights to it.

In my case it was that Crystal Reports didn't have the rights to read. In your case it might be the same thing- registry setting for MapPoint.