473,396 Members | 1,847 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

WMI ConnectionOptions with Timeout.

53
Hello all,

How this Timeout option is useful ?

When i am going for WMI connection i have given this Timeout option , Still for connection is taking 5 to 6 seconds.
ConnectionOptions.Timeout = new TimeSpan(0, 0, 2);

Actually in this case, According to my knowledge on TimeOut property ,It should get WMI connection success or failure with in 2 seconds, but still it is taking time up to 5 seconds.

With out this timeout option also observed the same time taken for WMI connection.

Please any one tell me, In which respective the timeout option will be useful.
Oct 13 '08 #1
4 8223
PRR
750 Expert 512MB
Hello all,

How this Timeout option is useful ?

When i am going for WMI connection i have given this Timeout option , Still for connection is taking 5 to 6 seconds.
ConnectionOptions.Timeout = new TimeSpan(0, 0, 2);

Actually in this case, According to my knowledge on TimeOut property ,It should get WMI connection success or failure with in 2 seconds, but still it is taking time up to 5 seconds.

With out this timeout option also observed the same time taken for WMI connection.

Please any one tell me, In which respective the timeout option will be useful.
WMI connection specially to remote computer takes time... quite a few seconds... i guess 2 secs is way to less....
Timeout MSDN
Acc to MSDN ...timeout property (remember its ManagementOptions.Timeout Property ... inherited)
"Gets or sets the time-out to apply to the operation. Note that for operations that return collections, this time-out applies to the enumeration through the resulting collection, not the operation itself (the ReturnImmediately property is used for the latter)"

i guess... connection failure or server not found in WMI... for remote PC... there is more than one attempt to establish a connection .. before timing out...
Oct 13 '08 #2
PRR
750 Expert 512MB
"The ManagementOptions.Timeout property is intended for WMI semi-sync
operations. In particular, the ConnectionOption.Timeout property is not used
to control the timeout for a WMI connection. This is because the underlying
WMI COM API doesn't support specifying a timeout value. The timeout value is
default to the value DCOM specifies (usually 60secs). You can adjust this
value via dcomcnfg.exe. "
Andy Cheung

i guess you could first establish that the client exists .. Ping
then you could try n connect to the remote pc..
Run dcomcnfg.exe-> Go to mycomputer properties -> options-> tansaction timeout..
Oct 13 '08 #3
DKn
53
"The ManagementOptions.Timeout property is intended for WMI semi-sync
operations. In particular, the ConnectionOption.Timeout property is not used
to control the timeout for a WMI connection. This is because the underlying
WMI COM API doesn't support specifying a timeout value. The timeout value is
default to the value DCOM specifies (usually 60secs). You can adjust this
value via dcomcnfg.exe. "
Andy Cheung

i guess you could first establish that the client exists .. Ping
then you could try n connect to the remote pc..
Run dcomcnfg.exe-> Go to mycomputer properties -> options-> tansaction timeout..
Hi,
Thanks for you reply.

I changed that Transaction timeout under dcomcnfg from 60 sec to 10 sec.
Then I tried to test whether this change is effecting or not.
Purposely I tried to connect to the non existing host which will take more time.
Still the WMIScope.Connect() method is taking around 45 sec to execute.
It should come out with in 10 sec right? Please give some input. I don't want to wait until the default time as you said 60 sec..
Oct 13 '08 #4
PRR
750 Expert 512MB
Hi,
Thanks for you reply.

I changed that Transaction timeout under dcomcnfg from 60 sec to 10 sec.
Then I tried to test whether this change is effecting or not.
Purposely I tried to connect to the non existing host which will take more time.
Still the WMIScope.Connect() method is taking around 45 sec to execute.
It should come out with in 10 sec right? Please give some input. I don't want to wait until the default time as you said 60 sec..
non existing host?? i guess its becoz the connection attempt is made more than once... besides i guess the timeout time of 60 sec ... possibly cannot be reduced...(as far as i know)...
you could establish first that the client exists and then "know" that all your clients OS support WMI .. After that you could connect?
Oct 13 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: E Sullivan | last post by:
I am having a time out issue when multiple users are accessing the server. This time out does not happen all of the time. My understanding is that the time out value is actually set in two places....
12
by: Geigho | last post by:
Setting session timeout in web.config file does not seem to have any effect. Any explanation or suggestion will be appreciated.
4
by: Andreas Semmelmann | last post by:
Hello. I´ve following Problem. I try to use WMI in an ASP.NET Site. But I get still this error: Server Error in '/ServerMon' Application....
4
by: DavidS | last post by:
First: There are several ways to confuse one regarding session timeout. (1) web.config - <sessionState timeout="20"> (2) IIS Manager | Internet Information Services | ServerNode | Default Web Site...
4
by: UJ | last post by:
I have a page where the user can upload a video file. As you can guess, this may take a while. Is there a way I can change the session timeout for just this one page? I would also want to change...
22
by: Nick Craig-Wood | last post by:
Did anyone write a contextmanager implementing a timeout for python2.5? I'd love to be able to write something like with timeout(5.0) as exceeded: some_long_running_stuff() if exceeded:...
25
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
I tried: <sessionState timeout="1"> </sessionState> bounced IIS, and after 1 minute still had a session. ??? -- thanks - dave
5
by: Masso | last post by:
Hallo to the group, my question is this: where i have to set timeout in a web application? If i set into sessionState with property Timeout="60", after 20 minutes the session is over. Always...
2
by: JimLad | last post by:
Hi, I've got a very basic asp.net page that accesses a very slow db query and siplays to screen. I'm hitting a timeout aftre about 3.5 to 4.5 minutes - seems to be variable. SQL connection...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.