Dcomconfig Settings for Excel 2003 on Windows XP

From: Prasad Patil (PrasadPatil_at_discussions.microsoft.com)
Date: 03/28/05


Date: Mon, 28 Mar 2005 07:25:03 -0800

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);
}

[/Code]

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



Relevant Pages

  • Re: Lost columns in formated text (space delimited) save
    ... Dave Petersons note about the display settings made me look at those settings ... output in a text editor, back to excel, adjust, save, and recheck in that text ... My Dear Dave Peterson -- ... as Jeff Clark who started this thread, finds that the resultant text file ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Force excel to read dates as D/M/YYYY
    ... Roger Govier ... Which version of Excel are you using? ... Try changing the settings to United States, then back again to English. ...
    (microsoft.public.excel.worksheet.functions)
  • New user with focused direction! Will Excel and VBA do it?
    ... the background - I am certain a code geek designed Newsgroup format ... Excel is intimidating; I ... Form settings which are saved between sessions. ...
    (microsoft.public.excel.newusers)
  • RE: New user with focused direction! Will Excel and VBA do it?
    ... I cant say that at some point excel and vba wont be able to do what you ... specifically related to wood properties - it's a hobby. ... Form settings which are saved between sessions. ...
    (microsoft.public.excel.newusers)
  • RE: Formatting numbers
    ... I make data import from another system into excel. ... Tools>Options>International tab (I'm translating back to English, ... settings and enter desired characters in decimal separator and thousands ...
    (microsoft.public.excel.misc)