Home

Linqpad script connects to API in GUI but not with LPRun

Hello.

Been searching for help with this issue, but not finding anything here or in stackoverflow, so posting the question here.

I have a linq script (C# program) that calls an API. When I run the script using the Linqpad GUI, the script succeeds, the API is called and a response is returned. When I run the script using LPRun, the API request is sent, but there is an error message returned every time -- "The underlying connection was closed: An unexpected error occurred on a send."

The script has a reference to RestClient that it uses to connect to the API.

Any thoughts on why the API call does not work when called by LPRun?

Thank you!

Comments

Sign In or Register to comment.