Error: Access is denied

From: AProchko (AProchko_at_discussions.microsoft.com)
Date: 02/28/05


Date: Sun, 27 Feb 2005 20:37:04 -0800

I am following the MSDN Library example: An Introduction to Programming
Outlook 2003 Using C#

Attempting to access outlook from C# .NET ASP app. Have added reference to
COM Microsoft Outlook 11 Object Library. Have included

using System.Runtime.InteropServices;
using System.Web.Mail;
using Microsoft.Office;
using Microsoft.Office.Interop;
using Microsoft.Office.Interop.Outlook;
using Microsoft.Office.Core;

When I run, it compiles but I get runtime error: ASP.NET is not authorized
to access the requested resource. Consider granting access rights to the
resource to the ASP.NET request identity. ASP.NET has a base process identity
(typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is
used if the application is not impersonating. If the application is
impersonating via <identity impersonate="true"/>, the identity will be the
anonymous user (typically IUSR_MACHINENAME) or the authenticated request
user.

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
appropriate user or group. Highlight the ASP.NET account, and check the boxes
for the desired access.

Line 72: Application outlookApp = new Application();

_____________________
I granted write access for ASPNET to Program files\Microsoft
Office\Office11msoutl.olb

I'm using Authentication mode = Windows

Any clues where to start? AProchko



Relevant Pages

  • Re: Microsoft Outlook Web Access
    ... OO programming and .NET are supposed to be the cat's meow, ... NOT Outlook Express, the full version. ... That is what I use at home and I do not have any of the problems I mentioned, with it, only with the Web Access version that I use at work. ... The same procedure of mouse click and key strokes work consistently in Explorer and Outlook 2003 and I believe in most if not all Windows programs, but they produce different results in the Web Access Outllook. ...
    (comp.lang.cobol)
  • Re: Outlook 07 Custom Task Form and SQL
    ... If you want to save the list, you could put it in a StorageItem object in a mail/post public folder. ... Author of Microsoft Outlook 2007 Programming: ... I created the custom form, for which you've seen the code. ...
    (microsoft.public.outlook.program_forms)
  • Re: Can I learn VBA quickly and how?
    ... If you have some programming experience, ... as this will give you both the working basics of the ... B2:B50, and creates an outlook task item. ... Set objOutlook = GetObject(, _ ...
    (microsoft.public.excel.programming)
  • Re: Microsoft Outlook Web Access
    ... OO programming and .NET are supposed to be the cat's meow, ... I'm running Outlook with Office 2003. ... When you right click on the Deleted Items directory and select delete all, ... appear to my wondering eyes, but 35 open windows, one for each email. ...
    (comp.lang.cobol)
  • Re: Microsoft Outlook Web Access
    ... OO programming and .NET are supposed to be the cat's meow, ... I'm running Outlook with Office 2003. ... I have never had occasion to delete the deleted items directory entries, ... we used Lotus Notes which also responded differently from WIndows programs I ...
    (comp.lang.cobol)