locked
Provide a webservice via https RRS feed

  • Question

  • User-603589925 posted

    Hello all

    I'm new in this forum. I will describe you my problem so good is possible. If you don'tunderstand something, or must have more information, let me know.

    I will develope a new webservice for our customers, which can call over https. For testing I created a simply Webservice with one function HelloWorld. The webside works with IIS and with the certificate from our System Engineer, with the InternetExplorer I can access to this webservice succsessful.

    Also my colleague can call the method "GetHelloWorld" with a test webside in PHP successful. But if I will create a new ServiceReference(VisualStudio 2010) in a WindowsForms Application for client side, I  receive following error:

    Fehler beim Downloaden von 'https://webservice-staging.wka.ch/WkaWebservice.asmx'.
    Die Anfrage wurde abgebrochen: Es konnte kein geschützter SSL/TLS-Kanal erstellt werden..
    Metadaten enthalten einen Verweis, der nicht aufgelöst werden kann: "https://webservice-staging.wka.ch/WkaWebservice.asmx".
    Es konnte kein sicherer Kanal für SSL/TLS mit Autorität "webservice-staging.wka.ch" eingerichtet werden.
    Die Anfrage wurde abgebrochen: Es konnte kein geschützter SSL/TLS-Kanal erstellt werden..
    Wenn der Dienst in der aktuellen Projektmappe definiert ist, erstellen Sie die Projektmappe, und fügen Sie den Dienstverweis erneut hinzu.

    Have anyone an idea where the problem can be.

    Maybe a misteak with the certificate(But in PHP works with the same certificate)?

    Or did I must configure something in the web.config on server side to allow https?

    Or can it be, that we have a misteak on the IIS configuration?

    Thank you for your answers or links to further informations to create a webservice correctly with https.

    Wednesday, December 19, 2012 5:03 AM

Answers

  • User-1349187584 posted

    you need to SSL certificate on server where you had deployed your webservice. there are some option available to set https. it is site wise not vertual directory wise.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 21, 2012 8:02 AM

All replies

  • User-851967432 posted

    The issue is most likely in the way you're consuming the service in the WindowsForm application.

    How are you consuming the web service?

    Wednesday, December 19, 2012 11:19 AM
  • User-603589925 posted

    In the Visual Studio I go to the Project three view on the right side and make a right click on ServiceReferences. Then I select 'add service reference'.  Then it open a new window where you can input the URL from the webservice and define the namespace.
    If I consuming a web service over http, that works fine but with https not.

    Thursday, December 20, 2012 2:05 AM
  • User-851967432 posted

    Ah...yes...you need to setup the security on the service side...if it's allowing http but not https

    Thursday, December 20, 2012 11:50 AM
  • User-603589925 posted

    Ok. But where I must make this settings? In my webservice project or must I make some settings on IIS (mayby https bindings)?
    But our system engineer told me, we have only a https connection from client to our reverse proxy, from there we have only http to our webservice and beacuase this reason, a https binding is not necessary. It's this correct?

    Friday, December 21, 2012 2:14 AM
  • User-1349187584 posted

    you need to SSL certificate on server where you had deployed your webservice. there are some option available to set https. it is site wise not vertual directory wise.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 21, 2012 8:02 AM
  • User-603589925 posted

    Thank you for your suggestion. I tested now the connection between my client and the server in the same network. I made a https- binding on IIS side, installed the right certificate on client side and added a new service reference in my solution where call the webservice. That work's very well now.

    But now I have one further problem. The same URL called from outside of our network. Then the request goes over our reverse proxy, so i get the same errormessage where I posted in the top of this thread.

    Can anyone tell me, what notice we must take, when we work with a reverse proxy? At the moment, we have only a https connection between the client and the reverse proxy. The transmission to the webserver is over http. It can be, that the misteak is there?

    Wednesday, January 23, 2013 9:39 AM