Issues with Invoke-Webrequest in Build 214 and 215

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 1 year and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
michelverbeek
Posts: 3
Last visit: Tue Feb 27, 2024 5:23 am
Been upvoted: 1 time

Issues with Invoke-Webrequest in Build 214 and 215

Post by michelverbeek »

Hello,

Product, version and build: 5.8.214 & 5.8.215
Operating system: Windows 10
PowerShell version(s): 5.1

*** Please add details and screenshots as needed below. ***

Invoke-WebRequest from PSS host fails:

Invoke-WebRequest -Uri xxx://www.xxxxxxxxxxxxxxxxx

>> Running (test.ps1) Script...
>> Platform: V5 64Bit (STA)
ERROR: Invoke-WebRequest : Value of '-1' is not valid for 'Value'. 'Value' should be between 'minimum' and 'maximum'.
ERROR: Parameter name: Value
test.ps1 (14, 1): ERROR: At Line: 14 char: 1
ERROR: + Invoke-WebRequest -Uri xxx://wwwxxxxxxxxxxxxxxxxxxxx
ERROR: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ERROR: + CategoryInfo : NotSpecified: (:) [Invoke-WebRequest], ArgumentOutOfRangeException
ERROR: + FullyQualifiedErrorId : System.ArgumentOutOfRangeException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
ERROR:

The exact same command runs fine from Powershell 5.1 native host

Workaround: deinstall build 215 and install build 213

Kind regards
Michel
Michel Verbeek
Wageningen University
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: Issues with Invoke-Webrequest in Build 214 and 215

Post by Alexander Riedel »

The only thing that changed regarding the host is the location. The folder name changed from containing 2022 to using 2023.
Most likely you have a firewall exception that no longer applies.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: Issues with Invoke-Webrequest in Build 214 and 215

Post by Alexander Riedel »

We have identified the issue. It will be part of an upcoming service build.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 1 year and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.