an error occurred while sending request

0 Answers 663 Views
API Testing
Top achievements
Rank 1
septe asked on 04 Jan 2022, 09:46 AM
I'm a new user telerik and now I have an issue like this. how to solve this issue.?
this issue was created after I'm use connect telerik with data web service(API).

System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> 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)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at Telerik.Reporting.Processing.WebServiceDataSource.WebServiceClient.SendCore(IWebServiceRequestSettings settings, AuthenticationHeaderValue authHeader, HttpClient httpClient, HttpClientHandler httpClientHandler)
   at Telerik.Reporting.Processing.WebServiceDataSource.WebServiceClient.Request(WebServiceDataSource processedDS)
   at Telerik.Reporting.Processing.WebServiceDataSource.WebServiceDataProvider.GetRemoteRawData(WebServiceDataSource processedDS)
   at Telerik.Reporting.Processing.WebServiceDataSource.WebServiceDataProvider.get_RawData()
   at Telerik.Reporting.Processing.WebServiceDataSource.WebServiceSchemaAdapter.AddDataMeasures(SimpleDataModel model)
   at Telerik.Reporting.Processing.Data.SimpleSchemaAdapterBase.Fill(SimpleDataModel model)
   at Telerik.Reporting.Processing.Data.SimpleDataProvider`1.GetSchemaCore()
   at Telerik.Reporting.Processing.Data.DataProvider`1.Telerik.Reporting.Processing.Data.IDataProvider.GetSchema()
   at Telerik.Reporting.Data.Design.DataSourceService.GetLocalSchema(IDataSource datasource, IDataProviderContext dataProviderContext)
   at Telerik.Reporting.Data.Design.DataSourceDesignerBase.Telerik.Reporting.Design.Interfaces.IDataSchemaProvider.GetSchema()
   at Telerik.Reporting.Data.Design.DataSourceService.GetSchemaFromContext(Object context)
   at Telerik.Reporting.Data.Design.DataSourceService.Telerik.Reporting.Design.Interfaces.IDataSourceService.GetCurrentDataItemSchema(Boolean getFromParentRecursively)
   at Telerik.Reporting.Design.DataExplorerControl.<>c__DisplayClass2.<RefreshDataSource>b__0()
Telerik team
commented on 06 Jan 2022, 04:59 PM

Hi Septe,

We have previously observed the following error with a developer certificate:

The SSL connection could not be established, see inner exception.
------------- InnerException -------------
The remote certificate is invalid according to the validation procedure.

The Stack trace of the error indicated that the validation was done in the System.Net.TlsStream.EndWrite that we do not control. The problem probably comes from missing or invalid certificate. Note that our code uses the System.Net and the related classes for making the requests. Internally, we do not check for certificates. This is done entirely by the System classes.

Let us know if further questions arise.

Top achievements
Rank 1
commented on 10 Jan 2022, 04:22 AM

Hi Neli,
thank you for your answer.

yeah, this issue was solved after I change the service.

No answers yet. Maybe you can help?

API Testing
Asked by
Top achievements
Rank 1
Share this question