Call a .NET component from an ASP page - The Code Project - .NET: "Introduction
Call a .NET component from an ASP page
The following steps outline how to call a .net component from VB6.0/ASP developed in either Microsoft Visual Basic? .NET or Microsoft Visual C#? .NET.
PART - I
1. Launch your Visual Studio .NET.
2. Open your .NET Class Project
3. Add a reference to the System.EnterpriseServices namespace.
4. At the top of the code file, add the following statements to specify the namespaces needed
-----------------------------------------------------------
[C#]
using System.EnterpriseServices;
using System.Runtime.InteropServices;
[Visual Basic .NET]
Imports System.EnterpriseServices
Imports System.Runtime.InteropServices
-----------------------------------------------------------
5. Add the following statements before the namespace declaration to set the assembly options:
-----------------------------------------------------------
[C#]
[assembly: ApplicationName('ClassLibrary1')]
[assembly: ApplicationActivation(ActivationOption.Server)]
[assembly: ApplicationAccessControl(false,
AccessChecksLevel=AccessChecksLevelOption.ApplicationComponent)]
[Visual Basic .NET]
* ClassLibrary1 ? sample project.
----------------------------------------------------------
These attributes help specify how the .NET assembly will operate with COM+ services. The Appli"