Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
914 views
in Technique[技术] by (71.8m points)

wcf - Unable to add service reference SSL

There was an error downloading '_vti_bin/ListData.svc/$metadata'.

The underlying connection was closed: An unexpected error occurred on a send. Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

An existing connection was forcibly closed by the remote host

Metadata contains a reference that cannot be resolved: 'https://dummy.svc'.

An error occurred while making the HTTP request to https://dummy.svc. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server.

The underlying connection was closed: An unexpected error occurred on a send. Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

An existing connection was forcibly closed by the remote host

If the service is defined in the current solution, try building the solution and adding the service reference again.

question from:https://stackoverflow.com/questions/65547095/unable-to-add-service-reference-ssl

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Gradually, web servers switch to new security protocols and delete security protocols that are not recommended, so this may be the cause of your error. Usually, .net will automatically find common security protocols, but sometimes you need to use ServicePointManager.SecurityProtocol performs display update.You can try the following code to force the latest protocol type.

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls13;

About SecurityProtocolType.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...