如何手动发布ASP.NET Web服务 [英] How to publish ASP.NET web service manually
本文介绍了如何手动发布ASP.NET Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个ASP.NET Web服务C#代码。我想手动生成这个Web服务。
在编写Web服务的源代码后,在visual studio中,当我们按下RUN按钮时,它会自动启动服务器并在浏览器上发布Web服务。
我想要相同的RUN按钮功能,以便我手动点击按钮手动发布Web服务。
请帮忙。
i have a ASP.NET web service C# code. I want to generate this web service manually.
Like in visual studio after writing the source code for web service, when we press RUN button ,it automatically start a server and publish the web service on browser.
I want the same RUN button functionality so that i manually publish the web service on a button click manually.
Please help in this.
推荐答案
在基于Web的项目中单击 RUN 时,Visual Studio可以执行多项操作。
1)如果您有一个Web服务器(本地或远程完整的IIS),并且您已正确设置项目属性,它会部署更改。
2)如果您有IIS Express,它会启动一个新站点或部署更改(如果已经存在)
3)如果没有,如果存在则启动所谓的开发服务器
最后两个不用于制作。
不过,我有一种感觉,你正在寻找别的东西。您可以使用多种形式的自托管Web解决方案。包括WCF(参见:创建自托管WCF服务 [ ^ ]),其中意味着您根本不需要Web服务器,您的应用程序/服务将包含所需的任何内容。
我还建议阅读本文: http://www.codemag.com/Article/1312051 [ ^ ]
When you click RUN in a web based project, Visual Studio can do several things.
1) If you have a web server (local or remote full blown IIS), and you have properly set the project properties, it does deploy the changes.
2) If you have IIS Express it starts a new site or deploys the changes if already exists
3) If none if these exists it starts the so called development server
The last two are not for production.
Still, I have a feeling, that you are looking for something else. You can many forms of self-hosted web solutions. Including WCF (see: Creating a Self Hosted WCF Service[^]), which means you don't need a web server at all, your application/service will contain anything needed.
I also suggest reading this article: http://www.codemag.com/Article/1312051[^]
这篇关于如何手动发布ASP.NET Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文