我创建了一个 COM+ DLL 用于 ASP 和 PHP
示例代码:
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
现在我想将 DLL 用于“VB Form”但不起作用,因为它是一个 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."
有什么方法可以加载 COM+ DLL,或者我需要用相同的代码创建一个新的项目,但对于普通的 DLL?