Trying to send Outlook tasks from asp/vb.net web app and I have this:
VB Code:
Imports Microsoft.Office.Interop.Outlook Public Class WebForm1 Inherits System.Web.UI.Page #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End Sub Protected WithEvents Button1 As System.Web.UI.WebControls.Button 'NOTE: The following placeholder declaration is required by the Web Form Designer. 'Do not delete or move it. Private designerPlaceholderDeclaration As System.Object Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim objOutlook As Microsoft.Office.Interop.Outlook.Application Dim objTask As TaskItem objOutlook = New Microsoft.Office.Interop.Outlook.Application objTask = objOutlook.CreateItem(OlItemType.olTaskItem) objTask.Recipients.Add("ssmith") objTask.Subject = "Test" objTask.Body = "This is the body" objTask.Assign() objTask.Send() End Sub End Class
But right when i say objOutlook = New....
I get an error:
I tried everything...What the hell is this error. What file????!?!?!?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 <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.
I tried to go to the reference itself:
C:\Program Files\Microsoft Office\OFFICE11\MSLOut.olb
I right clicked and added every frigging user in our company...still no luck...gave them write permissions and everytihng...
I need to get this to work so badlyplease guys help!!!!
Just need to send outlook tasks from asp.net/vb.net to a user.




...still no luck...gave them write permissions and everytihng...
please guys help!!!!
Reply With Quote