SocketException on calling the script from a custom process

Hi,

I am facing the same issue as below post:

https://www.oneidentity.com/community/identity-manager/f/forum/27436/web-service-connectivity-issues

I have a custom script in which I am calling the PATCH method of a REST service to update few parameters.

As an individual script with hard coded parameters, the script execution is successful and the result is as expected.

Issue is when i attach the script to a Process where the input parameters are passed. I am getting the below error

[810222] Error executing script 'UpdatePRMRecord'.    [System.Net.WebException] Unable to connect to the remote server    [System.Net.Sockets.SocketException] No connection could be made because the target machine actively refused it 157.133.93.36:443

The above IP is the public IP accessed via proxy. Please suggest the connectivity checks I need to perform.

Regards,

Jilani

Parents
  • The answers and the proposed solutions would be the same as in the mentioned post.

  • Dear Markus,

    Below is the code snippet that I have in the custom script in which the authentication credentials are mentioned:

    Dim webClient As WebClient = New WebClient()
    Dim partner As PartnerContactUser = New PartnerContactUser()
    partner.UserID=USER_ID
    partner.Email=EMAIL
    Dim jsonData As String = JsonConvert.SerializeObject(partner, Newtonsoft.Json.Formatting.Indented)

    webClient.Credentials = New NetworkCredential(userName, password)  'Authentication Credentials

    webClient.Headers.Add("Content-Type","application/json")

    Dim responseArray As Byte() = webClient.UploadData(clientUrl,"PATCH",System.Text.Encoding.Unicode.GetBytes(jsonData))

    Your response for the mentioned post was "You may want to check if a proxy is used that needs authentication. Maybe the service account running the Job Service cannot access the proxy."

    Does it mean that I need to configure the authentication details to job service? If so could you please guide me in that direction where to configure.

    Regards,

    Jilani

Reply
  • Dear Markus,

    Below is the code snippet that I have in the custom script in which the authentication credentials are mentioned:

    Dim webClient As WebClient = New WebClient()
    Dim partner As PartnerContactUser = New PartnerContactUser()
    partner.UserID=USER_ID
    partner.Email=EMAIL
    Dim jsonData As String = JsonConvert.SerializeObject(partner, Newtonsoft.Json.Formatting.Indented)

    webClient.Credentials = New NetworkCredential(userName, password)  'Authentication Credentials

    webClient.Headers.Add("Content-Type","application/json")

    Dim responseArray As Byte() = webClient.UploadData(clientUrl,"PATCH",System.Text.Encoding.Unicode.GetBytes(jsonData))

    Your response for the mentioned post was "You may want to check if a proxy is used that needs authentication. Maybe the service account running the Job Service cannot access the proxy."

    Does it mean that I need to configure the authentication details to job service? If so could you please guide me in that direction where to configure.

    Regards,

    Jilani

Children