简体   繁体   English

在Visual Studio 2010上发布Web服务

[英]Publish a web service on Visual Studio 2010

I created a web service in C#, using Visual Studio 2010 ( Framework .NET 3.5). 我使用Visual Studio 2010(Framework .NET 3.5)在C#中创建了一个Web服务。 In debug mode it works great, but now I must publish it on the internet, so that I can consume it in remote (the app that will consume the web service is an android app). 在调试模式下,它很好用,但是现在我必须在Internet上发布它,以便可以在远程使用它(使用Web服务的应用程序是android应用程序)。

So the question is: how do I publish my web service on Internet so that I can consume it in remote? 所以问题是:如何在Internet上发布我的Web服务,以便可以远程使用它?

Thanks in advance; 提前致谢; this is a work for taking my degree! 这是我获得学位的工作!

A simple way: you switch to release mode, update your web.config for production, right click on your service project and from the menu select publish. 一种简单的方法:切换到发布模式,更新web.config进行生产,右键单击服务项目,然后从菜单中选择“发布”。 Then you publish it to the local folder. 然后,将其发布到本地文件夹。 This way it copies only the files needed. 这样,它仅复制所需的文件。 Then you copy the contents of the folder to your remote site using ftp, for example, your hosting provider should have given you the credentials. 然后,您使用ftp将文件夹的内容复制到远程站点,例如,您的主机提供商应已为您提供了凭据。

for some hosters it is also possible to publish directly but I don't use this. 对于某些托管人,也可以直接发布,但我不使用它。

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

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