3

I'm trying to update/add a web reference from visual studio community 2013 but I have experimented a very tedious error as shown in the images:

Add web reference image

Update web reference image

(Adding web reference is been used in new project to test if I was able to add the web reference)

both errors seems to be related to the fact that there is an error downloading the metadata of the wsdl, this was not happening before, for any reason I cannot update/add the web reference any more. The URL where the wsdl is being loaded correctly in a browser, besides I also can ping the server. I have tried many things that I found on internet like this question error downloading $metadata from webservice, but I didn't have good results, if there is another solution or assumption that help me to figure out what is happening I will be very thankful.

I always tried by adding the web reference by Service reference, but i didn't work, this is what the error said:

There was an error downloading 'https://ssl00.kiusys.com/rserver2.4.2/server.kiu?wsdl/_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: Se ha forzado la interrupción de una conexión existente por el host remoto. Se ha forzado la interrupción de una conexión existente por el host remoto Metadata contains a reference that cannot be resolved: 'https://ssl00.kiusys.com/rserver2.4.2/server.kiu?wsdl'. An error occurred while making the HTTP request to https://ssl00.kiusys.com/rserver2.4.2/server.kiu?wsdl. 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: Se ha forzado la interrupción de una conexión existente por el host remoto. Se ha forzado la interrupción de una conexión existente por el host remoto If the service is defined in the current solution, try building the solution and adding the service reference again.

Thanks a lot beforehand.

Community
  • 1
  • 1
Diego Arturo
  • 171
  • 1
  • 3
  • 15
  • looks like you are using the 'old' add reference method. Have you tried adding it through: right click on reference => add service reference and then enter the wsdl-url? – Roelant M Sep 21 '16 at 19:53
  • yes I have tried it, but it said more information i will edit the question to show you what is happening when i try to add it by service reference. – Diego Arturo Sep 21 '16 at 20:04
  • and what if you download the wsdl and then try to add it? As url you can give the path to you local wsdl file. – Roelant M Sep 21 '16 at 20:07
  • sounds like there is a mismatch with the certificate. Is the url also available with HTTP? So you can test your wsdl, and add the certificate later? – Roelant M Sep 21 '16 at 20:15
  • @RoelantM your Idea works to add the reference, I finally be able to add it!!, but i am facing a new problem, when I call one of the methods it sais this: Additional information: CKIU::GetWebCheckinOptions: Se ha terminado la conexión: Error inesperado de envío. :: No se puede escribir datos de en la conexión de transporte: Se ha forzado la interrupción de una conexión existente por el host remoto. – Diego Arturo Sep 21 '16 at 20:33
  • @RoelantM, no it seems that it is only available in HTTPS protocol, well, what i mean is that i cannot browse the URL under HTTP protocol – Diego Arturo Sep 21 '16 at 20:36
  • @RoelantM put your comment "and what if you download the wsdl and then try to add it? As url you can give the path to you local wsdl file." as the answer that help me, i'll mark it as the correct one. Thanks for your help. – Diego Arturo Sep 21 '16 at 20:52

2 Answers2

2

Try to download the wsdl and then add it. You can then choose the path to you local wsdl file.

Roelant M
  • 1,581
  • 1
  • 13
  • 28
0

I had the same issue and solved it as follows:

  1. I took the latest Web Service Project.
  2. Un-tick the read-only flag from that Project Properties in Windows Explorer and clicked on Save.
  3. Open the Project in Visual Studio and Rebuild the solution.
  4. In Project where you are using the Web Service update the web reference of web service or remove the web reference and add it again.
B--rian
  • 5,578
  • 10
  • 38
  • 89
vishal
  • 65
  • 1
  • 2
  • 13