0
Answer

Emailing from a web application through Outlook

Jon.Wenger

Jon.Wenger

20y
2.6k
1
Hello, I have been trying to either open or save an email through Windows Outlook 2003 (v11) to the computer accessing my web application. I read the article on this website (http://www.c-sharpcorner.com//Internet/SendingEmailsThroughOutlookCB.asp) about saving an email into the outbox in Outlook, however I keep getting this error. 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. 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 , 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. Source Error: Line 11: Public Function startOutlook(ByVal toVal As String, ByVal subjectVal As String, ByVal bodyVal As String) Line 12: 'Return a reference to the MAPI layer Line 13: Dim ol As New Outlook.Application Line 14: Dim ns As Outlook.NameSpace Line 15: Dim fdMail As Outlook.MAPIFolder I was wondering if anyone knows how to grant the ASP.NET account permission to access Microsoft Outlook. I have tried to add permissions to this folder but I cannot figure out how. Thank you, Jon Wenger