Visual Studio workflow not working. System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

Frank Martin 476 Reputation points
2024-10-20T13:31:01.6633333+00:00

I created a workflow in Visual Studio 2019 for SharePoint 2016 the first time. It is just logging to history these words "workflow started". When workflow starts it is showing following error:

HTTP to: https://myspserver/sites/site1/_api/sp.utilities.utility.ResolvePrincipalInCurrentContext?input='i%3A0%23.w%7Ccontoso%5CSPFarm'&scopes='15'&sources='15'&inputIsEmailOnly='false'&addToUserInfoList='false'&matchUserInfoList='true' System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure. at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult) at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)

This is dev environment, and I know there is SSL error because certificate in browser has expired. But if I create SPD 2010 and SPD 2013 then they work just fine.

How can I make this Visual Studio work with SSL error? Some way to ignore error?

SharePoint Workflow
SharePoint Workflow
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Workflow: An orchestrated and repeatable pattern of business activity, enabling data transformation, service provision, and information retrieval.
607 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,622 questions
0 comments No comments
{count} votes

Accepted answer
  1. Emily Du-MSFT 47,626 Reputation points Microsoft Vendor
    2024-10-21T06:43:33.3733333+00:00

    I'm glad to hear you found a workaround for the issue, if you have any other issue about SharePoint, you are welcome to raise a ticket in this forum.

    By the way, since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others.". So, I would make a brief summary of this thread:

    You could click the "Accept Answer" button for this summary to close this thread, and this can make it easier for other community members to see the useful information when reading this thread. Thanks for your understanding!

    [Visual Studio workflow not working. System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.]

    Issue Symptom:

    OP created a workflow in the Visual Studio 2019 for SharePoint 2016. When the workflow starts it is showing following error:

    HTTP to: https://myspserver/sites/site1/_api/sp.utilities.utility.ResolvePrincipalInCurrentContext?input='i%3A0%23.w%7Ccontoso%5CSPFarm'&scopes='15'&sources='15'&inputIsEmailOnly='false'&addToUserInfoList='false'&matchUserInfoList='true' System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure. at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult) at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)

    This is dev environment, and the SSL error because certificate in browser has expired. But if OP create SPD 2010 and SPD 2013 then they work just fine.

    How to make this Visual Studio work with SSL error? Some way to ignore error?

    Current status:

    OP generated self-signed certificate and issue is now fixed.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Frank Martin 476 Reputation points
    2024-10-21T05:36:32.5066667+00:00

    I generated self signed certificate and issue is now fixed.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.