I have a web service and I want to call it from https. What is the solution? This work for http.
Asked
Active
Viewed 989 times
-2
-
So what is the issue here? The same code that work from http should work for https - are you facing any problems? Post the relevant code! – VinayC Mar 06 '12 at 06:47
-
Am I sure - no, I cannot be 100% sure w/o knowing what are you doing! I don't know how r u invoking web service; whether its WCF service, asmx service or XML/JSON/REST service written in .NET/non-.NET language... there are a lot of unknown heres - so bottom line is post some code if you are really interested in getting an answer from anybody! – VinayC Mar 06 '12 at 07:08
-
my service is asmx service written in C# that works fine with http but don't work with https. now what are the possible reasons? – masoud ramezani Mar 06 '12 at 07:30
-
what are your reasons for down vote? – masoud ramezani Mar 07 '12 at 05:41
-
I've downvoted because you haven't provided enough information on what you're doing, as @VinayC states. – MrKWatkins Mar 14 '12 at 10:37
1 Answers
1
Since I have a pretty good background in server setup, I will try and tackle this question.
First off, you need to set up SSL on your website. This involves buying a SSL Certificate or self signing one. Once you have a SSL certificate you need to set up your server to use it and serve your website through SSL.
As for you web code, the service you are hosting will work just fine under SSL as without. You will just have to change how you call it to use https:// instead of http://.
If you are trying to secure sensitive data you may want to set up your web server to redirect all non SSL requests to the the same path but under SSL by changing http:// in the path to https://. Any decent server administrator should know how to do this.

Michael D. Kirkpatrick
- 488
- 4
- 16
-
1I am not sure if OP is asking about service hosting related problem. The question title suggests that he has issue in invoking the web service from a CLR function/proc within SQL Server. – VinayC Mar 07 '12 at 06:38