Dcomconfig Settings for Excel 2003 on Windows XP

P

Prasad Patil

Hi,
I have a asp.net/c# web application when i try to create the following
excel object using the following code mentioned below

I have Office 2003 installed on my PC, VS.Net 2003. but still it gives the
following
error.

I get the error

COM object with CLSID {00024500-0000-0000-C000-000000000046} is either not
valid or not registered.

Sample Code of my Web Application

Code:
using Excel=Microsoft.Office.Interop.Excel;

Excel.Application excelApp = null;

try
{
// Instantiate Excel and start a new workbook.
excelApp = new Excel.ApplicationClass();
}
catch( Exception theException )
{
String errorMessage;
errorMessage = "SM Error: ";
errorMessage = String.Concat( errorMessage, theException.Message );
errorMessage = String.Concat( errorMessage, " Line: " );
errorMessage = String.Concat( errorMessage, theException.Source );

Response.Write( errorMessage);
}

The following DCOM config settings i have done
In the Component Services - > Dcom Config ->

Microsoft Excel Application object & {000C101C-0000-0000-C000-000000000046}
object

I have the following settings

On the General Tab
Authentication level is default

On the Security Tab
I have Given the the Lauch & Access Permissions for the following Users

System, Interactive, EveryOne, Administrators, IUSR_XX, IWAM_XX, ASPNET,
& the
User with which i logon on to the System.

On the Identity Tab

For Excel Application object - I have Selected "The Launching User" radio
option

For {000C101C-0000-0000-C000-000000000046} object - I have selected "The
System Account (services only)" radio option

With these settings when i launch the Excel using a WinForm C# application
it works fine but not for the web application.

Kindly let me know if you have any suggestions/ideas


Regards,
Prasad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top