简体   繁体   中英

How to publish a Web Service from VS 2010?

I have created a Web Service on VS 2012 . Now what I want to do is to invoke this Web Service from a Client but the trick is that the client is running on another computer ( on Raspberry Pi computer and written in Java -- though I think I doesn't matter) .

When those two programs were on the same machine it worked perfectly but now I want to initiate the Client from another computer.

From what I have read I understand that I need to Publish this Web Service on my Computer, but I haven't fount suitable guide of how to do it (read about IIS -- do I need it ?)? Moreover do I need to make some changes on my Client so it wont look for a Web Service on local machine? The Client was created using WSDL files from the Web Service Server.

Thanks .

All you need is to publish Web Service. On order to publish you should right click on the project in the solution explorer, then select publish. Then Create new virtual directory in IIS Manager that points the publish folder. I'm not whure which system and IIS versions do you have, anyway here is the guide.

OK , I have managed to solve the problem. First of all before dealing with IIS ,verify this : that you configured it well

It took me hours browsing through forums to find this issue. Afterwards ,create new Site at your IIS ,if you intend to use it from remote places then give it hostname like: http://192.168.1.21 . Add this to your Web.config file (only for remote sessions).

Then Go to your VS 2010 Web Server project (open VS as administrator), Go to Propertirs --> Use local IIS --> Enter URL (In my case http://192.168.1.21/18.RaspPI_WEBSERVICE ) --> push Create Virtual Directory.

After those actions new directory should appear under your Site (my Site hostname was 192.168.1.21 ).

Press Start under Manage Web Site Panel and that basically it ...

I have managed to run Web service client on remote Raspberry PI and upload the gathered information into my Web Server over the IIS .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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