0

I create a COM+ DLL to use with ASP and PHP
Sample Code :

Imports System.EnterpriseServices
Imports System.Runtime.InteropServices


<Assembly: ApplicationNameAttribute("NAME")>
<Assembly: SecurityRoleAttribute("Roles", True)>
<Assembly: ApplicationAccessControl(False)>
<Assembly: ApplicationActivationAttribute(ActivationOption.Server)>
<Assembly: ApplicationID("XXXX-XXXXX----")>

<ComVisible(True)>
Public Interface IAdminInterface
    Function Version() As String
    Property FormatOutput() As String
End Interface


<ProgId("NAME.Admin")>
<ComClass(Admin.ClassId, Admin.InterfaceId, Admin.EventsId)>
Public Class Admin

   Inherits ServicedComponent

    Public Const ClassId As String = "XXXX-XXXXX----1"
    Public Const InterfaceId As String = "XXXX-XXXXX----2"
    Public Const EventsId As String = "XXXX-XXXXX----3"

    {...}

End Class

Now I want to use the DLL for "VB Form" but not work because is a COM+.

<b>ERROR :</b>
System.Runtime.InteropServices.COMException: "The server process could not be initiated because the identity configured is not correct. Check the user's name and password.The server process could not be initiated because the configured identity is not correct. Check the user's name and password."

There is any way to load COM+ DLL or I need create a new proyect with same code but for normal DLL ?

  • Only work same code if delete Assembly,Interface and COm References.
  • https://stackoverflow.com/questions/9095688/asp-net-com-interop-excel-generation-issue-when-hosting – Hans Passant Mar 02 '23 at 11:02
  • Thanks, but not my case. I want to use DLL direct in WINDOWS FORM , not in IIS – javi200482 Mar 02 '23 at 22:50
  • by windows form, do you mean vb.net, or do you mean say COM based software, such as VBA (office/access), or VB6. If you want to use that .dll with managed code (say in vb.net or even c#)? Then you can just reference the assembly, and you don't even need com. However, if you talking about win32 software, such as VB6, or say ms-access? Then that's very easy, and I'll post a simple example, but only if you wanting to use that .net dll. from "non" .net code. Note that such .dll's created in c# or vb.net can be used by either c# or vb.net. So what TARGET consumption are you looking for here? – Albert D. Kallal Mar 04 '23 at 18:32
  • All in Vb.net. I reference the dll, but not work. – javi200482 Mar 04 '23 at 23:19

0 Answers0