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 .
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.
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.
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.
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 .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With