testing purposes.
application.
works.
Post by Jeffrey Tan[MSFT]Hi Arturo,
Thanks for your feedback.
Oh, this sounds an unusual situation to me. Does the Registry.GetValue
only returns a null reference? Is there any exception throw in your COM+
application? If this is a permission issue, Registry.GetValue() should
throw SecurityException as documented in MSDN.
Also, does this problem happen to all registry keys under HKLM or several
specific keys? I have created a sample ServicedComponent followed the steps
http://www.15seconds.com/issue/030501.htm
'''Server
<Assembly: ApplicationName("MyRegService")>
<Assembly: AssemblyKeyFile("..\..\bin\key.snk")>
<Assembly: ApplicationActivation(ActivationOption.Server)>
Public Class MyRegService
Inherits ServicedComponent
Public Function GetRegValue(ByVal keyName As String, ByVal valueName As
String) As String
Return Registry.GetValue(keyName, valueName, Nothing)
End Function
End Class
'''Client
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim obj As RegistryComponent.MyRegService = New
RegistryComponent.MyRegService()
MsgBox(obj.GetRegValue("HKEY_LOCAL_MACHINE\SYSTEM\Setup",
"SystemPartition"))
End Sub
End Class
I am reading SystemPartition value under HKLM\SYSTEM\Setup key. It works
without any problem. So it seems that I can not reproduce your problem
locally.
To troubleshoot this issue, I would recommend you to use Process Monitor to
monitor the registry activities of your COM+ process. In dcomcnfg.exe, if
your COM+ starts, your application will be listed under the "Running
Processes" node. In it, you will find the your running COM+ process id.
Then, in the ProcMon, you may filter by the process id so that you only
monitor your COM+ application registry activity.(remember to dismiss the
file system button so that ProcMon will not show the file system activity).
Also, you may input add another filter "Path" "Contains"
"HKLM\SYSTEM\Setup" to eliminate the unnecessary output. You may download
http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx
I think the ProcMon records may reveal why the registry access fails. You
may paste it here for analysis.
Finally, it would be more efficient if you could provide a sample project
with detailed reproduce steps. Before doing this, you might want to check
if this problem can be reproduced on other machines.
Hope this helps.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
=========================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
This posting is provided "AS IS" with no warranties, and confers no rights.
Post by Jeffrey Tan[MSFT]Hi Arturo,
How about this issue now? Have you reviewed my last reply to you? Have you
tried to use Process Monitor to monitor the COM+ process registry
activities?
If you still need any help or have any concern please feel free to tell me,
thanks.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
=========================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
This posting is provided "AS IS" with no warranties, and confers no rights.
Submitted via EggHeadCafe
Pass Values Between Windows Forms
http://www.eggheadcafe.com/tutorials/aspnet/a3e1e170-21d9-4a59-a659-3ead05bb36f2/pass-values-between-windows-forms.aspx