创建asp.net web服务的SSL HTTPS [英] create asp.net webservice for SSL HTTPS
问题描述
我使用Visual Studio 2008 ...,并创建了一个ASP.NET网站。在这个网站项目,我有一个Web服务文件的.asmx。调用该服务在HTTP上工作得很好。但是现在有一个,它被称为通过SSL / HTTPS。
要求当我浏览到通过HTTP网址,的.asmx和WSDL显示就好了。但是当我把HTTPS,浏览器显示消息Internet Explorer无法显示该网页
我们运行在一个窗口本网站2003服务器IIS。
如果可能易行,我只会想调用该服务通过HTTPS ......离开这个项目可通过HTTP的网页的其余部分。如果那是很困难的我仍然可以创建此服务的新项目......但我仍然不知道如何使它能够使用HTTPS。
在此先感谢您的帮助!
进口的System.Web
进口System.Web.Services
进口System.Web.Services.Protocols
进口System.Data这
< WebService的(命名空间:=HTTP://services.vm.vmc/InstantAccount/)> _
< WebServiceBinding(ConformsTo:= WsiProfiles.BasicProfile1_1)> _
&其中; Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
公共类为MyWebService
继承System.Web.Services.WebService
<的WebMethod()> _
公共职能的doSomething(BYVAL p_String作为字符串)作为字符串
返回测试
端功能
末级
对于任何人谁可能想知道同样的事情在未来...有三个步骤来实现这一点。
1)改变命名空间为https,在code文件的顶部
2)改变IIS启用HTTPS通过必要的端口
3)创建通过IIS签名的证书(我们做了一个自签名的)
I use Visual Studio 2008... and have created an ASP.NET website. Within this website project, I have a Web Service file .asmx. Calling this service over HTTP works just fine. But there is now a requirement that it be called over SSL / HTTPS.
When I browse to the URL through HTTP, the .asmx and WSDL show up just fine. but as soon as i put HTTPS , the browser shows the message 'Internet Explorer cannot display the webpage'
We run this site on a windows 2003 server with IIS.
If easily possible, I would only want to call this service over HTTPS... and leave the rest of the pages in this project available over HTTP. If thats very difficult I can still create a new project for this service... but I still dont know how to allow it to be accessed over HTTPS.
Thanks in advance for any help!
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Data
<WebService(Namespace:="http://services.vm.vmc/InstantAccount/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class MyWebService
Inherits System.Web.Services.WebService
<WebMethod()> _
Public Function doSomething(ByVal p_String As String) As String
Return "Test"
End Function
End Class
For anyone who may be wondering the same thing in the future... there were three steps to accomplishing this
1) change the Namespace to https, at the top of the code file
2) change IIS to enable HTTPS over the necessary port
3) create a signed certificate through IIS (we did a self-signed one)
这篇关于创建asp.net web服务的SSL HTTPS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!