473,654 Members | 3,078 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Suppress DCOM error when attempting to Read Remote Registry from vb.net

I am have created a reporting tool for our network to output various
information we are interested in like Microsoft Office versioning
information and etc. One of the things I have to do is attempt to Read
the machines Registry remotely like so:

Private Function ReadRegistryKey (ByVal strRLoc As String, _
ByVal strSubKey As String, ByVal strVal As String, _
ByVal strMachineName As String) As String
Dim rKey As RegistryKey, sKey As String
Try
rKey =
RegistryKey.Ope nRemoteBaseKey( RegistryHive.Lo calMachine,
strMachineName)
rKey = rKey.OpenSubKey (strRLoc & strSubKey)
sKey = rKey.GetValue(s trVal)
Return sKey
Catch ex As Exception
Return ""
End Try
End Function

If the Remote Registry service has been disabled or the computer is off
then I am getting a System event log entry:

Event Type: Error
Event Source: DCOM
Event Category: None
Event ID: 10009
Date: 2/4/2005
Time: 1:52:01 PM
User: XXX\xxxxxxxx
Computer: XXXXXXXXXX
Description:
DCOM was unable to communicate with the computer XXXXXXX using any of
the configured protocols.

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
I would like to supress these event log entries if possible.

Does anyone have any ideas on what I would need to do?

Sincerely,

Timothy Frawley

Nov 21 '05 #1
4 3559
best guess this is part of the DCOM functionality, which logs error.
i am quite sure that you will be unable to supress these log entries.

so you can do 2 things, first cheif if the machine is online, and then
check if the Remote Registry service is running.

Nov 21 '05 #2
Hi Tim,

I agree with Nikolay's suggestion. Also .NET provide a ServiceControll er,
which will help us to determine the service on remote machine. We use
try..catch, in case the remote machine is down.

Imports System.ServiceP rocess
Module Module1
Sub Main()
Try
Dim sc As New ServiceControll er
sc.MachineName = "remotemachinen ame"
sc.ServiceName = "RemoteRegistry "
Console.Write(s c.Status.ToStri ng())
Catch ex As Exception
Console.Write(e x.ToString())
End Try
End Sub
End Module

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #3


Thank you both, Nikolay and Peter,

Your posts where very helpful. I have applied your suggestions and I
believe I will no longer have DCOM errors in the event log!!

Thank you again!

Tim

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 21 '05 #4
Hi Tim,

I am glad that our suggestion helped you, and thank Nikolay for sharing the
knowledge in the community. :)

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
15246
by: Prashanth Uppunda | last post by:
Hello, Does anybody have an idea on how to instantiate a DCOM server residing in another machine using C#? Thanks Prashanth
2
5846
by: David Olive | last post by:
Hi guys, I'm having a bit of a problem getting a VB .NET console app to run happily as a scheduled task. The app itself generates a bunch of word documents on a file share on another server by reading from a template file and inserting text at bookmark locations (with details pulled from a table in the database). I'm running the app under a regular domain account that isn't an administrator on the server. The read/execute permissions are...
5
6375
by: Sergey V | last post by:
Having following problem 1. Client: ASP application with anonymous access to be running as DOMAIN\my_user on WinXP 2. Server: DCOM NT Service runs on remote host (W2K Server) under the same account DOMAIN\my_user security within server is initialized using hr = CoInitializeSecurity(&appid, -1, NULL, NULL, 0, 0, 0, EOAC_APPID, NULL);
0
2844
by: csharp_helpwanted | last post by:
steps.. first, I'm creating a connection by mapping a network drive to the pc second, the map drive connection was successful I try to read a certian registry key/value (that is a valid reg item) third, I disconnect the network drive connection it works great the first time but if i run it again on the same pc anytime after that I get the following
13
5438
by: Kyle Adams | last post by:
I don't know where is the right place to ask this so I will start here. Can someone explain to me what these represent? I think they all have to do with the middleware level, but I really don't understand what a DCOM Server is or a Microsoft Transaction Server, etc. I have no idea.... Kyle
1
4325
by: PrettySneaky | last post by:
I currently working on a webservice which calls a DCOM object! The webproject works just fine when i run it in Visual studio 2005. However due to some compability issues with .NET 2.0 and the server which my webservice uses I have to use Visual Studio 2003 and a older .NET framework (.NET 1.1 or something, not important). Now it's impossible to run the webservices and I believe it has to do with something with the security settings of...
0
3889
by: matsla | last post by:
I have followed all guide lines to set up remote debugging but is it possible to do cross-domain remote debugging? I use same account/password on both computers (XP => 2003), added users to debug group, change DCOM security etc. I get following error in the event log when try to start the remote debugging Visual Studio 2003... DCOM got error "General access denied error" from the computer COMP1
0
814
by: James | last post by:
a common error registering on my xp machine is "DCOM was unable to communicate with the computer xxxx using any of the configured protocols." i want to know what classes in vb.net can i use to "check" on DCOM so that i can ensure all remote computers DCOM are ok. i've admin rights to remote machines, while most of the remote machines access are ok, the above is also happening when admin id is logon, kindly advise
1
5318
by: Paul W | last post by:
I attempted to find the solution and came close (http://blogs.msdn.com/robgruen/archive/2005/01/24/359660.aspx) but cannot go any further. I have an ASP.NET (2003/C#) app that calls a VB 6 DCOM on a remote server. Identity used on DCOM is the same identity as used for the IIS app. Line of code that throws error: object obj = Activator.CreateInstance(Type.GetTypeFromProgID("class","server1"));
0
8372
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8285
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8475
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8591
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6160
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5621
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4293
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1915
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1592
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.