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?
……………owen
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)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.209;