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.
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.
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?
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.
Anil Pathak
Software Developer
LnT Infotech
Marked as answer by Angie xu - MSFT on Dec 26, 2012 11:21 PM
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?
VistaSys
0 Points
6 Posts
Provide a webservice via https
Dec 19, 2012 09:03 AM|LINK
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.
</div>adamturner34
Contributor
4394 Points
1102 Posts
Re: Provide a webservice via https
Dec 19, 2012 03:19 PM|LINK
The issue is most likely in the way you're consuming the service in the WindowsForm application.
How are you consuming the web service?
VistaSys
0 Points
6 Posts
Re: Provide a webservice via https
Dec 20, 2012 06:05 AM|LINK
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.
adamturner34
Contributor
4394 Points
1102 Posts
Re: Provide a webservice via https
Dec 20, 2012 03:50 PM|LINK
Ah...yes...you need to setup the security on the service side...if it's allowing http but not https
VistaSys
0 Points
6 Posts
Re: Provide a webservice via https
Dec 21, 2012 06:14 AM|LINK
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?
Anil Pathak
Member
206 Points
54 Posts
Re: Provide a webservice via https
Dec 21, 2012 12:02 PM|LINK
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.
Software Developer
LnT Infotech
VistaSys
0 Points
6 Posts
Re: Provide a webservice via https
Jan 23, 2013 01:39 PM|LINK
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?