Error while instantiating outllook object in aspx

delorpompom

New Member
I am trying to instantiate microsoft outlook application object in asp.net page.<BR> <BR>I am getting error as acccess is denied.<BR><BR>The error is as follows:--<BR><BR><BR>The exception that is thrown when the operating system denies access because of an I/O error or a specific type of security error.<BR><BR> <BR>Server Error in '/Helpdesk' Application. <BR>--------------------------------------------------------------------------------<BR><BR>Access is denied. <BR>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. <BR><BR>Exception Details: System.UnauthorizedAccessException: Access is denied. <BR><BR>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. <BR><BR>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.<BR><BR>Source Error: <BR><BR>Line 30: <BR>Line 31: <BR>Line 32: golApp = New Outlook.Application()<BR>Line 33: objNewMail = golApp.CreateItem(OlItemType.olMailItem)<BR>Line 34: objNewMail.BCC = "[email protected]"<BR> <BR><BR>Source File: C:InetpubwwwrootHelpDeskDemo estlook.aspx.vb Line: 32 <BR><BR>Stack Trace: <BR><BR>[UnauthorizedAccessException: Access is denied.]<BR> Helpdesk.testlook.Page_Load(Object sender, EventArgs e) in C:InetpubwwwrootHelpDeskDemo estlook.aspx.vb:32<BR> System.Web.UI.Control.OnLoad(EventArgs e) +67<BR> System.Web.UI.Control.LoadRecursive() +29<BR> System.Web.UI.Page.ProcessRequestMain() +724<BR><BR> <BR><BR><BR>--------------------------------------------------------------------------------<BR>Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.0 <BR>Sunil P.Chowdhary.<BR>301-948-3033 ext:2493 (O)<BR>301-990-0187<BR> <BR> I have added references of outllok library , microsoft office library as well as ole automation. I have given all the rights to file but getting the same error.<BR>Any help will be appriciated.<BR><BR>Thanks ,<BR>Santosh...
 
Back
Top