Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 .

like image 219
2ko Avatar asked Dec 06 '12 13:12

2ko


People also ask

How do I Publish a web service in Visual Studio 2010?

Start Visual Studio 2010 and load up the Contoso University C# solution. Click the Package/Publish Web tab. Choose the Configuration for the package. Packages are configuration specific and settings are per configuration, so you need to choose the configuration and configure the setting before creating a package.

How do I Publish a web service in Visual Studio?

On the computer where you have the ASP.NET project open in Visual Studio, right-click the project in Solution Explorer, and choose Publish. If you have previously configured any publishing profiles, the Publish pane appears. Click New or Create new profile. Select the option to import a profile.

How do I Publish a web service in Visual Studio 2012?

Visual Studio 2012 includes a new and easy to use web publishing interface. Right-click on your Web Application Project and select “Publish” to easily deploy your web application into production.


2 Answers

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.

like image 67
heq Avatar answered Oct 04 '22 02:10

heq


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 .

like image 35
2ko Avatar answered Oct 04 '22 03:10

2ko