简体   繁体   English

ASP.NET“ HTTPS” WebService

[英]ASP.NET “HTTPS” WebService

1) When I create a Webservice (.asmx) in Asp.Net, its default is HTTP, but I need it in HTTPS.. How to do this? 1)当我在Asp.Net中创建Web服务(.asmx)时,其默认值为HTTP,但在HTTPS中却需要它。

2) And is it possible then to access to the methods on this webservice with "JAVASCRIPT" - even if the Server is HTTPS? 2)然后可以使用“ JAVASCRIPT”访问此Web服务上的方法-即使服务器是HTTPS吗?

Hope u guys can help me.. 希望你们能帮助我..

Normally you would adjust IIS on the webserver to make the service HTTPS. 通常,您将调整Web服务器上的IIS以使服务成为HTTPS。 You would add a certificate to the website in IIS and check the "Requires Secure Channel (SSL)" check box (this will then redirect people attempting to use HTTP to HTTPS. 您可以将证书添加到IIS中的网站,然后选中“需要安全通道(SSL)”复选框(然后,这会将尝试使用HTTP的用户重定向到HTTPS。

You should then be able to make AJAX calls from JavaScript by ensuring that you call your service with an https:// prefix, rather than a http:// prefix. 然后,通过确保使用https://前缀而不是http://前缀来调用服务,您应该能够从JavaScript进行AJAX调用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM