Friday 15 March 2013

c# - Setting per request value for ServicePointManager.SecurityProtocol -



c# - Setting per request value for ServicePointManager.SecurityProtocol -

this question has reply here:

set securityprotocol (ssl3 or tls) on .net httpwebrequest per request 4 answers

in c# able set static value ssl3 or tls, e.g.

servicepointmanager.securityprotocol = securityprotocoltype.tls;

or:

servicepointmanager.securityprotocol = securityprotocoltype.ssl3;

but (i believe) impact future httpwebrequest objects in application.

is there way set given httpwebrequest or @ to the lowest degree given uri?

note have seen this:

uri uri = new uri(url); servicepoint sp = servicepointmanager.findservicepoint(uri);

but servicepoint not have securityprotocol property.

at nowadays thinking have set static global property prior creating new httpwebrequest.

this doesn't sense right , means:

i have create sure multiple threads not doing @ same time. i not sure point setting has been 'used' (i.e. when phone call webrequest.getresponse() servicepointmanager.securityprotocol accessed , bound uri?).

realised has been covered here:

how utilize ssl3 instead of tls in particular httpwebrequest?

and here:

set securityprotocol (ssl3 or tls) on .net httpwebrequest per request

confirming fears. users appear spinning separate app domain work around this. still think might possible thread locking if defined @ point setting bound particular web request object.

c# ssl httpwebrequest

No comments:

Post a Comment