harmmeijer
Programmer
I have created a serviced component with 2 public subs, after installing it the application shows in component services but the public methods don't show. I am not able to add or remove roles to or from methods
here is some code:
assamblyinfo.vb
testClass.vb
from the project folder started the following command:
sn -k sclib.snk
compiled the project
In the bin folder executed the following command:
regsvcs SCLib.dll
The application shows in mmc component services but when I
drill down to my methods I can't see them
(test serviced component -> SCLib.testClass -> _testClass -> Methods
I can start both methods however so the serviced component does run, when I remove the <SecurityRole("NotThisOne", True)> attribute from aaaa2 it doesn't raise a permission denied error.
Greetings, Harm Meijer
here is some code:
assamblyinfo.vb
Code:
Imports System.Reflection
Imports System.Runtime.InteropServices
Imports System.EnterpriseServices
<Assembly: AssemblyTitle("")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("")>
<Assembly: AssemblyCopyright("")>
<Assembly: AssemblyTrademark("")>
<Assembly: CLSCompliant(True)>
<Assembly: Guid("62B75D65-8062-48C1-AE53-6E60D480FBF3")>
<Assembly: ApplicationName( _
"test serviced component")>
<Assembly: Description("My description")>
<Assembly: ApplicationActivation(ActivationOption.server)>
<Assembly: AssemblyKeyFile("..\..\sclib.snk")>
<Assembly: ApplicationAccessControl(True, _
AccessChecksLevel:=AccessChecksLevelOption.ApplicationComponent _
)>
<Assembly: AssemblyVersion("1.0")>
testClass.vb
Code:
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.EnterpriseServices
Imports System.Runtime.InteropServices
<ComponentAccessControl(True), _
SecurityRole("NotThisOne", True) _
> _
Public Class testClass
Inherits ServicedComponent
<SecurityRole("NotThisOne", True), SecureMethod() _
> _
Public Sub aaaa1()
MsgBox("this is aaaa1")
End Sub
<SecurityRole("NotThisOne", True)> _
Public Sub aaaa2()
MsgBox("this is aaaa2")
End Sub
End Class
from the project folder started the following command:
sn -k sclib.snk
compiled the project
In the bin folder executed the following command:
regsvcs SCLib.dll
The application shows in mmc component services but when I
drill down to my methods I can't see them
(test serviced component -> SCLib.testClass -> _testClass -> Methods
I can start both methods however so the serviced component does run, when I remove the <SecurityRole("NotThisOne", True)> attribute from aaaa2 it doesn't raise a permission denied error.
Greetings, Harm Meijer