Questions tagged [servicepointmanager]

62 questions
1
vote
1 answer

the remote certificate is invalid according to the validation procedure using imap

I wrote a NET 4.5 client application tool using an IMAP require and a SMTP send command. Now my current issue is I get the following exception at one client: the remote certificate is invalid according to the validation procedure I changed the…
S.Sire
  • 27
  • 1
  • 3
  • 9
1
vote
1 answer

Servicepointmanager set sercurityprotocol exception

In my application i want to check which Security Protocol the client supports. I have the newest .Net Version. My Idea is to set the SecurityProtocol to the SecurityProtocolType Tls1.2 like: ServicePointManager.SecurityProtocol =…
1
vote
1 answer

Implement client-specific WCF ServicePointManager ServerCertificateValidationCallback?

ServicePointManager.ServerCertificateValidationCallback allows for custom validation of service-side certificates. This works fine when there is only one custom validator. But I have multiple clients and I need to be able to specify different…
MikeZ
  • 1,155
  • 1
  • 13
  • 20
1
vote
0 answers

PayPal IPN fails Server 2008 SP2 with TLS 1.1 and 1.2

This is my code Dim strSandbox As String = "https://www.sandbox.paypal.com/cgi-bin/webscr" '.net 4.0 ServicePointManager.SecurityProtocol = DirectCast(3072, SecurityProtocolType) Dim req As HttpWebRequest = CType(WebRequest.Create(strSandbox),…
Neil
  • 107
  • 1
  • 9
1
vote
0 answers

Detect real start of HttpWebRequest

I'm a web crawler written using the TAP pattern API of HttpWebRequest. I want to download some stuff from http://somedomain.tld but I might end up sending quite a number of requests. I don't know if somedomain.tld will respond in a timely fashion…
spender
  • 117,338
  • 33
  • 229
  • 351
1
vote
1 answer

Mono C# works fine on one Linux machine, but not on another! Maybe something to do with certificates?

I have some code that calls a soap service. It works fine on my first linux machine. However when I run it on another machine I get the error below. A Google seems to show it may be from certificates, although I'm not sure on this as I'm overriding…
Soyeed
  • 263
  • 1
  • 5
  • 12
1
vote
0 answers

Security with RijndaelManaged and ServicePointManager

I have a security question about RijndaelManaged and ServicePointManager. I have implemented a system where C# application is encrypting data, such as user credentials and some XML data. Then I use WebClient to send encrypted user credentials with…
Daniel
  • 33
  • 1
  • 1
  • 6
1
vote
2 answers

Why does settings ServicePointManager.ServerCertificateValidationCallback = null not work?

I have the following snippet, that I'm calling from a set of integration tests: private void Url_Contains_String_With_Certificate_Warning(string url, string expected) { // This line should restore default cert validation behaviour …
Dylan Beattie
  • 53,688
  • 35
  • 128
  • 197
0
votes
0 answers

ServicePointManager.FindServicePoint is obsolete in .NET 6

Starting in .Net6, ServicePointManager.FindServicePoint is obsolete and should not be used. However, I am using this ServicePoint to log some metadata about my service during a failing case var servicePoint =…
0
votes
0 answers

ServicePointManager Configuration Question

I found the code snippet below in multiple places on the web. I was just curious to know if it is changing the ServicePointManager permanently or if it is only doing so in the currently running script. Thank you in advance for the…
TNola
  • 1
0
votes
0 answers

'ServicePointManager.FindServicePoint(Uri)' is obsolet

I can't find a way to replace this obsolete method in .Net 6 . SYSLIB0014 'ServicePointManager.FindServicePoint(Uri)' is obsoleto: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead. StorageCredentials…
0
votes
0 answers

How can I Specify TLS 1.3 Signature Algorithms in C# HttpClient and SetPointManager?

With the help of a colleague, I have discovered some differences in some Windows 11 clients where the TLS 1.3 signature algorithms defined in the registry under…
0
votes
1 answer

Why ServicePointManager isn't recommended for new developments

I'm trying to intercept the validation of the returned server certificates in a .net framework application. I came with two solutions: Use HttpClientHandler.ServerCertificateValidationCallback = (httpRequestMessage, cert, cetChain, policyErrors)…
Gal I.
  • 201
  • 3
  • 12
0
votes
0 answers

how i can enable TLS before calling .exe inside PS1 file

I have a ps1 file which calls a .exe, as follow:- Show-Message -Message "Step 1a: Create groups and adding users to it" & "$HelperPath\Microsoft.Legal.MatterCenter.CreateGroups.exe" "true" $Username $Password now this will raise the following…
John John
  • 1
  • 72
  • 238
  • 501
0
votes
0 answers

ServicePointManager.ServerCertificateValidationCallback is not working on first try

I use this code in my .Net Core application to ignore SSL connection exception: ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true; ServicePointManager.MaxServicePointIdleTime = 0; Problem is…
Masoud Keshavarz
  • 2,166
  • 9
  • 36
  • 48