Advertisement

05.08.2007 at 08:28AM PDT, ID: 22559333
[x]
Attachment Details

Excel interop permissions issue?

Asked by Chaosian in DCOM, Programming for ASP.NET, Microsoft Visual Basic.Net

Tags: , , ,

VB .NET 2005 (ASP.NET); Excel Interop 11 (Excel 2003); Windows 2003

I've got an app that needs to use the Excel Interop to generate a spreadsheet. This works great on my machine. :)

When I put the page on the server, I get a COM access exception. When I look in the registry, the COM id matches the Excel interop id in the DCOM tree in Component Services. Through Component Services, I have given both the ASPNET user and the guest internet use full permissions to the DCOM object. I've also done the same through explorer for Excel.exe.

The stack trace is:
[UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.]
   ExcelHelper.FormatWorksheet(String fileName, String lineNumber, Int32 rowCount) +35
   ExcelHelper.GenerateWorkDocument(String templateName, String fileName, Int32 lineId) +221
   Secure_ViewWorkTickets.Page_Load(Object sender, EventArgs e) +97
   System.Web.UI.Control.OnLoad(EventArgs e) +98
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4310

Any suggestions as to what I might be doing wrong?Start Free Trial
[+][-]05.08.2007 at 08:37AM PDT, ID: 19050714

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: DCOM, Programming for ASP.NET, Microsoft Visual Basic.Net
Tags: excel, com, class, interop
Sign Up Now!
Solution Provided By: samtran0331
Participating Experts: 1
Solution Grade: A
 
 
[+][-]05.08.2007 at 08:47AM PDT, ID: 19050805

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.08.2007 at 08:51AM PDT, ID: 19050843

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32