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 / Component Services / December 2003

Tip: Looking for answers? Try searching our database.

ASP.Net and COM Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
xiko tripa - 14 Dec 2003 13:48 GMT
I have a web site coded in C#. It needs to call a COM component
written in VB6. This COM conects with another computer. This second
machine conects to a mainframe - kind of a wrapper - and returns some
informations from mainframe to COM component on the first machine (the
web server)

In the development server (Windows 2000) there's no problem calling
the component, but in the production server i got the following error:

ClassFactory cannot supply requested class
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.

Exception Details: System.Runtime.InteropServices.COMException:
ClassFactory cannot supply requested class

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.

Stack Trace:

[COMException (0x80040111): ClassFactory cannot supply requested
class]
  pontos.resultado_pontos.Page_Load(Object sender, EventArgs e) +43
  System.Web.UI.Control.OnLoad(EventArgs e) +67
  System.Web.UI.Control.LoadRecursive() +35
  System.Web.UI.Page.ProcessRequestMain() +731

I've put the ASPComp=True directive, either re-started IIS 6.0 but
still no luck. Anyone could give me some ideas?
xiko tripa - 14 Dec 2003 15:48 GMT
I forgot to mention the most important thing: the production server is
windows 2k3.

Is there any security issue that can avoid the component to be called? I'm
completelly lost on this problem.

thanks in advance.

Signature

---------------
Valmir Cinquini

Cidadania Italiana: visite http://www.cinquini.com.br
Banda larga de 1? mundo: Visite http://speedy.bravehost.com/speedy.htm
Lista MS-SQL: http://br.groups.yahoo.com/group/mssql-pt/join
Lista C#: http://br.groups.yahoo.com/group/csharp-pt/join

> I have a web site coded in C#. It needs to call a COM component
> written in VB6. This COM conects with another computer. This second
[quoted text clipped - 30 lines]
> I've put the ASPComp=True directive, either re-started IIS 6.0 but
> still no luck. Anyone could give me some ideas?
Brad - 15 Dec 2003 14:16 GMT
Valmir,
It sounds like there is a dependency (maybe more than one) for your
application that has differing versions on your dev box & production box.
One tool that may help you to find which dependency is causing the problem
is Filemon from www.sysinternals.com.

HTH
- Brad
xiko tripa - 15 Dec 2003 19:11 GMT
Hi Brad

Thanks for your reply.

We created a new application on COM+ manager for this dll. Disabling
the "Enforce the access checks for this application" checkbox in
Authorization's section of the Security's tab, we got it working
successfully, accessing the component through a classical ASP page.

I think I shouldn't put this dll on COM+, since there's no need to
keep connection pooling, etc. This component only connects to the
mainframe through a socket connection to get some data.

Is it necessary put this ddl on COM+ manager? Just checking access
permitions to the dll file is not enough?

Valmir

> Valmir,
> It sounds like there is a dependency (maybe more than one) for your
[quoted text clipped - 4 lines]
> HTH
> - Brad
Brad - 17 Dec 2003 16:10 GMT
Valmir,
You ask a good question - is there a need to put your dll in COM+?  
Unfortunately, that's not a question I can answer since I don't know the
goals of your application & its requirements.
Do you need any of the services offered by COM+?  Transaction support, JIT,
Synchronization, object pooling, etc. ?  If not, then there is likely no
need for you to put your dll in a COM+ app.

There are only two reasons in which one would put one's dlls in a COM+
application without using any of the services provided by COM+:
  1. Process isolation.  You want your dll to run in its own process that
is separate from the client's process.
  2. You want your code to run under the identity of a specific NT account.

HTH,
Brad
xiko tripa - 18 Dec 2003 01:43 GMT
Hi Brad

> Valmir,
> You ask a good question - is there a need to put your dll in COM+?
> Unfortunately, that's not a question I can answer since I don't know the
> goals of your application & its requirements.

It's simple: The user type their vehicle registration ID. The component
connects to a third machine (you called it 'box') where resides a 'manager'
(actually, a NT service). This NT service opens a connection through TCP/IP
socket with a Unisys MX series mainframe, get some data about the vehicle
(like bills, non payed taxes, etc) and give them back to the component

> Do you need any of the services offered by COM+?  Transaction support, JIT,
> Synchronization, object pooling, etc. ?  If not, then there is likely no
> need for you to put your dll in a COM+ app.

Yes, I agree with you, there's nothing in the process described above that
needs transaction support, snchronization, pooling, etc.

> There are only two reasons in which one would put one's dlls in a COM+
> application without using any of the services provided by COM+:
>    1. Process isolation.  You want your dll to run in its own process that
> is separate from the client's process.

Maybe proccess isolation would be a interesting issue. But there are few
access per day to this component. Maybe it'd soud like using a missel to
kill a fly

>    2. You want your code to run under the identity of a specific NT account.

I think we don't, the service on the third machine only accept calls from
the web server ip address.

> HTH,
> Brad

Thanks very much, Merry Christmas and Happy News Eve!
Signature


---------------
Valmir Cinquini

Cidadania Italiana: visite http://www.cinquini.com.br
Banda larga de 1? mundo: Visite http://speedy.bravehost.com/speedy.htm
Lista MS-SQL: http://br.groups.yahoo.com/group/mssql-pt/join
Lista C#: http://br.groups.yahoo.com/group/csharp-pt/join

Brad - 29 Dec 2003 16:42 GMT
Valmir,
Based on your answers, it sounds like you don't necessarily have a need to
put your component in COM+.

- Brad

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.