Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2005

Tip: Looking for answers? Try searching our database.

Cannot Create ActiveX Component

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Marisha - 21 Jun 2005 18:34 GMT
Hi guys,

I have some quiet common problem as I see from answers in the group.
I'm trying to create excel opject when running web application.
And it's filing on this step:
excel_app = CreateObject("Excel.Application")
I'm impersonating administrator and i tried dcomcnfg.exe to add
administrator to excel aplication security tab.
Any ideas,what's wrong?

Thanks,

Marina
Dmytro Lapshyn [MVP] - 22 Jun 2005 17:41 GMT
Hi Marina,

What's the exception you get? It might be that the creation of COM objects
is not allowed for Web applications by the Framework itself.

Signature

Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]

> Hi guys,
>
[quoted text clipped - 9 lines]
>
> Marina
Marina S - 22 Jun 2005 18:36 GMT
Hi Dmytro,

Thanks for you reply,
I'm getting an error of :Cannot create ActiveX Component.
It's looks like security problem,but as I said I'm impersonating
administrator in my code.

Thanks,

Marina
Dmytro Lapshyn [MVP] - 23 Jun 2005 10:05 GMT
Are you sure "Excel.Application" is a correct ProgID?

More than that, what's the CreateObject function? Is it a VB .NET shortcut
for Type.GetTypeFromProgID(...) and Activator.CreateInstance(...)?

Signature

Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]

> Hi Dmytro,
>
[quoted text clipped - 8 lines]
>
> *** Sent via Developersdex http://www.developersdex.com ***
Alvin Bruney [MVP - ASP.NET] - 26 Jun 2005 06:28 GMT
in order to call createobject on the excel application, the excel interop
must be correctly installed on the target system. make sure that is the case
before going further

Signature

Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc

> Hi Marina,
>
[quoted text clipped - 14 lines]
>>
>> Marina
Marisha - 28 Jun 2005 19:26 GMT
What do you mean correctly installed?
Dmytro Lapshyn [MVP] - 29 Jun 2005 17:44 GMT
Alvin,

I don't think so - the interop assembly is required if the Excel object is
created as a *TYPED* object, but Marina uses HttpServerUtility.CreateObject
that just returns an untyped System.Object reference.

Signature

Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]

> in order to call createobject on the excel application, the excel interop
> must be correctly installed on the target system. make sure that is the
[quoted text clipped - 18 lines]
>>>
>>> Marina
Alvin Bruney [MVP - ASP.NET] - 29 Jun 2005 23:31 GMT
Then how does it know what to create? It must know what an Excel.Application
is right? That knowledge comes only after an installation.

Signature

Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc

> Alvin,
>
[quoted text clipped - 25 lines]
>>>>
>>>> Marina
Dmytro Lapshyn [MVP] - 30 Jun 2005 14:10 GMT
Right, but only after the installation of Excel itself, not its Interop
assembly. The latter does not register any ProgIDs in the registry, it
merely instructs the framework on proper creation of runtime-callable
wrappers.

Signature

Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]

> Then how does it know what to create? It must know what an
> Excel.Application is right? That knowledge comes only after an
[quoted text clipped - 29 lines]
>>>>>
>>>>> Marina
Alvin Bruney [MVP - ASP.NET] - 01 Jul 2005 01:09 GMT
I see what you are saying. That's correct. I change my advice to this:

>>in order to call createobject on the excel application, excel  must be
>>correctly installed on the target system.

Signature

Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc

> Right, but only after the installation of Excel itself, not its Interop
> assembly. The latter does not register any ProgIDs in the registry, it
[quoted text clipped - 34 lines]
>>>>>>
>>>>>> Marina

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.