Groups | Blog | Home
all groups > dotnet component services > december 2003 >

dotnet component services : ASP.Net and COM Problem


xikotripa NO[at]SPAM bol.com.br
12/14/2003 5:48:28 AM
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
xiko tripa
12/14/2003 1:48:43 PM
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.

--



---------------
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


[quoted text, click to view]

xikotripa NO[at]SPAM bol.com.br
12/15/2003 11:11:25 AM
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


[quoted text, click to view]
BradLin NO[at]SPAM online.microsoft.com
12/15/2003 2:16:15 PM
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
BradLin NO[at]SPAM online.microsoft.com
12/17/2003 4:10:04 PM
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
12/17/2003 11:43:17 PM
Hi Brad

[quoted text, click to view]

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

[quoted text, click to view]

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

[quoted text, click to view]

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

[quoted text, click to view]
account.

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

[quoted text, click to view]

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



---------------
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


BradLin NO[at]SPAM online.microsoft.com
12/29/2003 4:42:13 PM
Valmir,
Based on your answers, it sounds like you don't necessarily have a need to
put your component in COM+.

- Brad
AddThis Social Bookmark Button