[英]C# web service Deployment to IIS Server
I have created a web service using C# and I have installed IIS Server 6.0. 我已经使用C#创建了一个Web服务,并且已经安装了IIS Server 6.0。 When I am running web service directly in project its working well. 当我直接在项目中运行Web服务时,它运行良好。 Now I want to deploy this service on my system's IIS Server so that my LAN partners can use it. 现在,我想将此服务部署在系统的IIS服务器上,以便我的LAN合作伙伴可以使用它。 How should I do that? 我应该怎么做? And I want to change default port number of IIS too, how can I do that? 我也想更改IIS的默认端口号,该怎么办?
To run your web service under IIS
, setting up a virtual directory is pretty straightforward . 要在IIS
下运行Web服务,设置虚拟目录非常简单 。
If you're looking to test publish a build, the web deployment project is the best option, you can do it from the command line and in VS.Net, it enables a "Publish" right-click
option. 如果要测试发布发布,则Web部署项目是最佳选择,您可以从命令行执行该操作,在VS.Net中,它启用"Publish" right-click
选项。
Your web service endpoint is your .asmx
file (no .cs
file required in your deployment), and the DLL
in the bin folder contains the code that you wrote for your webservice. 您的Web服务端点是.asmx
文件(在部署中不需要.cs
文件),bin文件夹中的DLL
包含您为Web服务编写的代码。
SOAP, WSDL, Namespace
are all handled by IIS and ASP.NET. SOAP, WSDL, Namespace
均由IIS和ASP.NET处理。
In simple words: 简单来说:
"ASP.NET Web service"
. 创建一个类型为"ASP.NET Web service"
。 "HTTP"
from location dropdownlist (indicates that the file should be placed on a web server) 从位置下拉列表中选择"HTTP"
(表明该文件应放置在Web服务器上) "browse UDDI Servers on the local network"
option if you want to share the web service among different computer. 开发Web服务后,添加Web引用,如果要在另一台计算机之间共享Web服务,请选择"browse UDDI Servers on the local network"
选项。 Enter the source .asmx
file URL and click "Go"
. 输入源.asmx
文件URL,然后单击"Go"
。 "Add References"
to add your reference name for web service, by default is "localhost"
, you can give it a name. 选择"Add References"
以添加Web服务的引用名称,默认情况下为"localhost"
,您可以为其命名。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.