GetResponse with "0" argument(s): "The operation has timed out


i have created job opens webpage on our internal lan. webpage takes 4 5 minutes complete it's process expected set high timeout of 10 minutes.
 the powershell job seems run fine error getresponse error
the corresponding line '$response = $request.getresponse()   '. correct script , reschedule job. error information returned powershell is: 'exception calling "getresponse" "0" argument(s): "the operation has timed out" 

code:

$request =[system.net.webrequest]::create("http://myinternalsite.com") $request.timeout = 60000; # 10 minutes $response = $request.getresponse()  $response.close()
tried searching solution nothing seemed me.
how can resolve issue? 
thanks


actually got working, issue timeout not long enough missed 0 in time out, timeout after 1 minute instead of 10 minutes.

evidently minute long enough page execute not long enough response.

$request =[system.net.webrequest]::create("http://myinternalsite.com") $request.timeout = 600000; # 10 minutes $response = $request.getresponse()  $response.close()



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

2008 Windows Deployment Server Properties Error

Can no longer user MS Update - Files required to use Microsoft Update are no longer registered

How do a find data in one file, search for it in another file and if not found, write a custom message to another file