I need help adding a security filter programatically.
Here's the code I have:
Dim objFolder As IDSSFolder
Dim objMDFilter As IDSSMDSecurityFilter
Dim mobjObjSource As IDSSSource
mobjObjSource = oSession.Component(EnumDSSComponentRole.DssRoleObjectSource)
objMDFilter = mobjObjSource.NewObject(DssTypeMDSecurityFilter)
When I run the app and it gets to the line creating the MDFilter, I get the following error:
System.Runtime.InteropServices.COMException: Internal Error: New Object: wrong source
at DSSCOMMasterLib.IDSSSource.NewObject(EnumDSSObjectType Type, EnumDSSSourceFlags Flags, IDSSUserRuntime pUserRuntime)
at mjrVNetSecMSI.mjrVNetSecMSI.CreateSecurityFilter(IDSSUser& objUser) in C:\Documents and Settings\1083431\My Documents\Visual Studio 2005\Projects\mjrVNetSecMSI\mjrVNetSecMSI\mjrVNetSecMSI.asmx.vb:line 348
at mjrVNetSecMSI.mjrVNetSecMSI.createUser(String sUserID, String sFullName, Int32 iNaId) in C:\Documents and Settings\1083431\My Documents\Visual Studio 2005\Projects\mjrVNetSecMSI\mjrVNetSecMSI\mjrVNetSecMSI.asmx.vb:line 199
What do I need to do to correct this issue?
Here's the code I have:
Dim objFolder As IDSSFolder
Dim objMDFilter As IDSSMDSecurityFilter
Dim mobjObjSource As IDSSSource
mobjObjSource = oSession.Component(EnumDSSComponentRole.DssRoleObjectSource)
objMDFilter = mobjObjSource.NewObject(DssTypeMDSecurityFilter)
When I run the app and it gets to the line creating the MDFilter, I get the following error:
System.Runtime.InteropServices.COMException: Internal Error: New Object: wrong source
at DSSCOMMasterLib.IDSSSource.NewObject(EnumDSSObjectType Type, EnumDSSSourceFlags Flags, IDSSUserRuntime pUserRuntime)
at mjrVNetSecMSI.mjrVNetSecMSI.CreateSecurityFilter(IDSSUser& objUser) in C:\Documents and Settings\1083431\My Documents\Visual Studio 2005\Projects\mjrVNetSecMSI\mjrVNetSecMSI\mjrVNetSecMSI.asmx.vb:line 348
at mjrVNetSecMSI.mjrVNetSecMSI.createUser(String sUserID, String sFullName, Int32 iNaId) in C:\Documents and Settings\1083431\My Documents\Visual Studio 2005\Projects\mjrVNetSecMSI\mjrVNetSecMSI\mjrVNetSecMSI.asmx.vb:line 199
What do I need to do to correct this issue?