Registration free COM components in the ASP.NET application

P

Peter Schargut

I want to use registration free COM component in the ASP.NET application.
I found the articel about registration free COM in the windows application:
http://msdn.microsoft.com/msdnmag/issues/05/04/RegFreeCOM/default.aspx
So I have wrote the manifest file for my COM component and tested this with
the windows application.
It works realy good.
Now i want to use this manifest with my ASP.NET application.
The native assembly loader looks for a manifest file based on the name of
the executable.
But what ist my executable in the ASP.NET application?
- Is this my DLL?
- Is this the ASP.NET worker?
- Is this the IIS Service?
- How can I use the manifest file for the ASP.NET application?
 
B

Bruce Barker

asp.net does not use the native loader (it uses its own). the actual exe is
the asp.net worker process (aspnet_wp.exe). also you should avoid com
objects (especially sta vb6 objects) in asp.net pages as there performance
costs.

-- bruce (sqlwork.com)
 
S

Steven Cheng[MSFT]

Hi Peter,

Welcome to the ASPNET newsgroup.

As for the Reg-Free COM component deployment model, it requires the
application provide a manifest file together with the application execute
image file. For ASP.NET web application, it is different from other normal
desktop .net application, ASP.NET application reply on the particular
worker process to host their ASP.NET application domain. And this worker
process is different depend on the server platform , for IIS5, it use the
aspnet_wp.exe(under .net framework folder) process while IIS6 use the
w3wp.exe(under inetsrv dir -----e.g. "C:\WINDOWS\system32\inetsrv")
process.
So far I haven't found any document mentioned about using reg-free COM
component for ASP.NET application, also, reg-free COM deployment model is
mainly focus on light-weight client-side application which require flexible
deployment. For ASP.NET applications , they're server-side application
which should not care about this, and we're recommended to use the
traditional COM deployment(registry).

Hope this helps.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
S

Steven Cheng[MSFT]

Thanks for your response Peter,

I'm afraid for ASP.NET this REG-FREE will not work as the article has also
mentioned the limitation of the current reg-free deployment model. ASP.NET
is a particular .net runtime host which reside in a particular unmanaged
process. Anyway, you can try the manifest with those ASP.NET worker
process (aspnet_wp.exe or w3wp.exe) to see whether it works.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Joined
May 31, 2007
Messages
1
Reaction score
0
I have been struggling for the last week to accomplish registration free COM in an asp.net application.

My tests show this:

When I have just compiled the whole web app and I access the COM object functionality the DLLs the COM object depends on get loaded by aspnet_wp.exe. Using a DLL monitoring tool (DLL Show) I can see that those DLLs are the ones sitting in the build folder. That's because duing the build the COM object in that folder gets registered. However if I manually unregister it (regsvr32 /u), restart IIS, and run the same test, it doesn't load them any longer and, naturally, the functionality is unavailable.

I have tried the approach of creating manifests for both the COM component and the aspnet_wp.exe. That didn't work.

I have also tried using the manifest automatically created when setting the Isolated flag to true on the Interop.xxx.dll that gets created when building the managed object that's using the COM component. That didn't work either.
Note that in that case the manifest will be named after the DLL that references the COM object, ie: native.MyDLL.manifest. Opening it shows that it does contain all the required COM GUIDs and class information.

If anybody has any other suggestions on how to make COM registration free usage in asp.net webapp, please let me know.

Thanks,

serge
 

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

Forum statistics

Threads
473,995
Messages
2,570,233
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top