Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > webservice.htc & https

Reply
Thread Tools

webservice.htc & https

 
 
Bart Malfait
Guest
Posts: n/a
 
      01-13-2004
Hi,

we want to access a webservice using https using webservices.htc (IE6). Is
this possible ?

Scenario: we've set up a server (W2K, .NET 1.1, latest SP's) with a
test-certificate (generated with makecert.exe). We also installed the
certificate as a trusted authority on the client (W2K, .NET 1.1, latest
SP's). Calling https://MyServer/ServiceTest/MyWebService.asmx?wsdl in the
client's IE succeeds. As expected, no pop-up anymore warning on an
unauthorized certificate. So far so good.

However, if we invoke the same URL in a piece of javascript in an html page,
using webservice.htc, we get a 'service not available' error. Replacing
'https' with 'http' succeeds. SSL-port is default on the server (443). Both
the javascript & webservice.htc are installed locally on the client (see
also below)

Any ideas what may go wrong are very appreciated !


----
FYI - client html page using webservices.htc:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>New Page 2</title>
</head>
<script>
var webServiceNameSpace;
var webService;

function loadWebService()
{
webServiceNameSpace = document.namespaces.add("webServiceNS",
"http://MyClient/Resources/webService");

webServiceNameSpace.doImport("http://MyClient/Resources/webservice.htc");

if (webServiceNameSpace != "complete") {
webServiceNameSpace .attachEvent("onreadystatechange",
createWebService);
}
else {
createWebService();
}
}

function createWebService()
{
var useOptions;

if (webServiceNameSpace .readyState == "complete")
{
webService = document.createElement("webServiceNS:webservice");
webService.id = "_servicegateway";
webService.visibility = "none";
document.appendChild(webService);
useOptions = webService.createUseOptions(true);

webService.useService("https://MyServer/ServiceTest/MyWebService.asmx?wsdl",
"myWebService", useOptions);
webService.myWebService.callService(handleResponse ,
"HelloWorld");
}
}

function handleResponse(result)
{
alert(result.error);
}
</script>

<body onload = "loadWebService()"> ... </body>

</html>


 
Reply With Quote
 
 
 
 
Bart Malfait
Guest
Posts: n/a
 
      01-13-2004
Feedback: under the cover "Microsoft.XMLHttp" is used and POST'ing from an
insecure to a secure website is not allowed.

For more background: check
http://support.microsoft.com/default...en-us%3B304420


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
netgear wireless router https problem bershtman@gmail.com Wireless Networking 3 03-15-2010 11:18 PM
server side redirect https => https NOT working Axel ASP General 8 04-27-2009 02:02 AM
https authentication & storing https page in string Naveen Dhanuka Ruby 1 09-19-2007 02:05 PM
open-uri and HTTPS, or net/https with a redirect jotto Ruby 4 10-02-2006 07:26 AM
Wireless problem with SP2 and HTTPS =?Utf-8?B?T21hciBLYXJpbQ==?= Wireless Networking 3 11-26-2004 03:40 PM



Advertisments