Deploying a WCF Service - web-services

I am using WCF for the first time. I Have successfully created the service and it works fine on my local machine. I want to know the steps involved for deploying the service to the client environment (including changes to the config file, IIS settings) and any other miscellaneous settings.

http://msdn.microsoft.com/en-us/library/aa751792.aspx
There you go - the how to from Microsoft

Right click the service project in VS, select Copy Website.
Specify the IIS path. (may need to connect)
Moves / sync all files.

You can also deploy a WCF service to a windows service host. This is desirable in many situations which are outlined here:
IIS WCF service hosting vs Windows Service

Related

how to host wcf service server ( that run on iis ) on windows service? [duplicate]

I wrote a wcf service that expose restful interface.
Now i using the iis as the wcf service host.
There are some action that i need to make on my application beside the exposing of the restful - and for this need i must run my application as a windows service.
But the using the iis as a host will not make my wcf server run as a service.
How to make it possible to using a windows service with expose wcf restful interface service ?
You can self-host WCF services, please refer to ServiceHost.
To be able to run the app in 2 different host models, you have to separate hosting stuff from you main code. The key point of it: you can use controllers created in the other library project.
I did this before:
Create a library project and move all you controllers and other classes there.
Create empty WFC service, add reference to the lib above and make it working.
Create an empty console app, reference to the lib, add self hosting stuff and make it working.
Add topshelf package to console app to be able to install it as windows service.
So you will get:
building and deploying WCF project you can host it in IIS;
building a console app you can run it as console app;
using topshelf install param you can install a console app as windows service.

Provider Hosted Apps Launch Issue

I have a provider hosted app (a normal asp.net web forms application) deployed on a typical web server IIS 7.5.
While launching the app from SharePoint Site in Office 365 Multi Tenant, it's throwing the below issue on App launch.
On capturing details using Fiddler, found the following when the app is launched
SPAppToken=&SPSiteUrl=https%3A%2F%2Fabc.sharepoint.com%2Fsites%2Fspdev%2Famsdev%2Famitamsdev&SPSiteTitle=amitamsdev&SPSiteLogoUrl=%2Fsites%2Fspdev%2FSiteAssets%2Flogo.gif&SPSiteLanguage=en-US&SPSiteCulture=en-US&SPRedirectMessage=EndpointAuthorityMatches&SPCorrelationId=31477a9c-2902-204a-8393-67eced1a10b8&SPErrorCorrelationId=31477a9c-2902-204a-8393-67eced1a10b8&
SPErrorInfo=The+requested+operation+requires+an+HTTPS+%28SSL%29+channel.++Ensure+that+the+target+endpoint+address+supports+SSL+and+try+again.++Target+endpoint+address
The SPErrorInfo Part is interesting. I am unable to confirm whether we really need the remote site to be configured for https?
Additional Information - Identity Provider is ACS and it is a low trust app.
Can someone suggest?
Regards,
Nitin Rastogi
In a production environment, you should always be using HTTPS. If you don't, you're exposing yourself (and your organization) to many risks.
If this is your development environment and you are confident this isn't an issue, you may want to look at the accepted answer to this question on the MSDN forums, which mentions the same error message. Their solution to bypass the HTTPS checking:
$c = Get-SPSecurityTokenServiceConfig
$c.AllowMetadataOverHttp = $true
$c.AllowOAuthOverHttp=$true
$c.Update()
When packaging the SharePoint App from Visual Studio, you must ensure that the URL you use is using HTTPS:
In IIS, add an HTTPS binding to the site to achieve this. You would have to reupload the App to SharePoint after packaging it with the new HTTPS URL.
More information here.

How to expose biztalk orchestration as a web service

I have a hypothetical request to pull in 3 data fields into an orchestration but only via a web service.
how can I do this with biztalk?
thanks
As #Tim has mentioned, the WCF Publishing Wizard is a good starting point.
Overview:
http://msdn.microsoft.com/en-us/library/bb226350
More here : http://msdn.microsoft.com/en-us/library/bb226564.aspx
A couple of notes:
You'll need to build and deploy your BTS project to a dev environment before you publish.
Make sure that when you publish you deploy to an app pool with the same user as the BizTalk Isolated host.
You don't actually need IIS / WAS to host the service - Biztalk can self host with e.g. WCF-Custom. So you can avoid the Isolated host in your production environment and turn off IIS entirely. This has performance and resource benefits.
Note that you may need to open up permissions for BizTalk to listen see here or here
Publishing and 'refreshing' the WSDL in a dev environment so that peer systems can create proxies etc can be a pain. After using the publishing wizard, you can use this tool to refresh your WSDL publication without having to redo the wizard.
http://www.microsoft.com/en-us/download/details.aspx?id=21973
Use the "BizTalk WCF Service Publishing Wizard". It will walk you through all the steps you need.

Web Service on Netbeans

I have created a Web Service in Net Beans 6.9 and deploy it locally. And I am using it via a java SE application by adding Web Service client in this application. How to obtain the link of the Web Serice so that it can be used from anywhere ?
2) From where to obtain WSDL file of Web Service ?
3) How to host a Web Service on the internet ?
Thank a ton in advance..!!!
You could create a new project of type web application in Netbeans.
In the web application, you will then create a web service (NOT a web service client).
For publishing and testing the web application, you will have to deploy it to a web server (e.g. GlassFish).
After publishing the web application, the WSDL file will be typically located at: http://localhost:<port>/<your web app>/<your service>?wsdl
For GlassFish, the default port is 8080.
If your current Netbeans installation doesn't support web projects or you don't have GlassFish installed, I suggest you download and install the latest version of Netbeans with Java EE support (bundled Apache Tomcat and GlassFish server in the same setup).
http://netbeans.org/downloads/index.html
Hosting SOAP web services on the internet at large has not been terribly successful. For example Google had SOAP based web services initially, and they switched to REST based services in the end. You may want to reconsider and deploy a REST based interface. If the bulk of your code is not embedded in the web service, then you should not have that difficult of a time switching the interface.
To deploy a SOAP or a REST web service, you would need to deploy a 'full' Java EE container (e.g. Glassfissh or JBoss) on a machine with access to the internet. You might virtual hosting e.g. Westhost, Amazon, or there are turnkey solutions like Heroku (note: I'm not endorsing any of the companies listed here; they're just examples). If you just want to deploy a REST based service, any web container will do e.g. Tomcat or Jetty. In addition to services mentioned above you could probably host a rest web service on any service that will let you upload a war file.

Host a SOAP web service on a server

I have a SOAP web service code (.asmx) created using VS.NET 2008 which I plan to host on a web server. I am unaware and completely new to the term 'hosting' . My question is whether there are any free and limited period web hosting services that offer me to host a .asmx web service having Microsoft SQL Server 2008 as backend. If yes, what should the approach be from my side ? Should I the upload the .asmx code or the entire VS.NET project ? I am working on localhost at present.
Thanks
This describes how to deploy ASMX web services:
http://msdn.microsoft.com/en-us/library/6x71sze4(v=VS.90).aspx
You'll need to find a web host that supports IIS and ASP.NET. I'm not aware of any free hosts that support server side scripts and SQL databases. One of the cheapest options that I've used in the past is GoDaddy, which should satisfy all your needs.
You can test locally if you install IIS 7, available through the web platform installer:
http://www.microsoft.com/web/downloads/platform.aspx