Can you host Web API and ServiceStack on same root route? - telerik

I have a third party Reporting tool (telerik) that uses Web API services to provide reporting services. The path to the reporting services begins with api/, I can get either ServiceStack or Telerik to operate separately or together if they are on different paths, but is it possible to have them on the same path using IgnoreRoute so that the route is ignored by the Web API service and handled by ServiceStack? I would like to have something like api/reports for Telerik and api/rest for ServiceStack. I'm sure there is some technical reason why this is not possible but would like to know why.

Related

Cloud / server side code with Apigee or Usergrid

Is it possible to execute server side code (something like Parse "Cloud Code") with Apigee, as backend for a mobile app as client?
I'd want to use the out of the box "App Services" functionality, but perform some extra stuff (like updating data) from the server side,
The only (naive?) way I can think of is this:
Have my own server running.
The mobile app uses standard "App Services" API on Apigee
If necessary, the client calls
some custom API on my server,
which lets my server call Apigee via REST to fetch data, calculate some results, and post the updated data Apigee
and then returns the result to the client
Sounds a bit complicated (especially in terms of handling authentication) - are there any best practices to achieve something like I described?
Thanks!
Consider App Services as your database in the cloud to which you can talk using APIs. Therefore, you really don't need that server in the between unless you are doing some heavy lifting in it. You could make that API call directly from the app.
Even if you want to have a back end server for your app, you can leverage the node.js functionality that Apigee Edge provides and have a server up and running in the cloud in quick time. More info can be found here
If you want to do server side validation, you should use a Node.js proxy that incorporates Usergrid. This will allow you to perform a query on the database and do processing of the results. Check out this presentation: https://speakerdeck.com/timanglade/coders-workshop-at-i-apis. In particular, see Section 7, which discusses using Usergrid and Node.js.

WebAPI/OWIN hosting confusion

There are so many things today? I'm looking to host web api in windows service but recently I come across this link http://www.asp.net/web-api/overview/hosting-aspnet-web-api/use-owin-to-self-host-web-api
is this a new thing and should we use this OWIN, Please suggest?
Does this OWIN make thing more faster or what are the benefit to use OWIN?
OWIN makes things a bit simpler and cleaner when self-hosting.
You might want to check out the OWIN Web API 2 self host in windows service example on GitHub.
Web API is based on owin, and owin is an abstraction. Instead of those old times when web api team was responsible for making web api availble on several hosts such as IIS, self host, etc, it just relays on owin. Owin has several implementations based on IIS, ASP.NET, ASP.NET Core, Self Host etc.
For example see the following sample of running asp.net web api odata on asp.net core using owin & kestrel: https://github.com/ymoradi/OwinAspNetCore
After doing more searching OWIN and Kanata are just layers on top particularly WebAPI, they are rather an convenient composer from what I understand from here http://msdn.microsoft.com/en-us/magazine/dn451439.aspx
for my purpose, I use WebAPI ONLY, so I don't need all these extra things.

Azure Worker role Webapi hosting + Service Bus

I would like to be able to pump messages from the azure service bus and dispatch them to Webapi controllers in a worker role. I have seen this excellent (series) article http://pfelix.wordpress.com/2012/03/15/asp-net-web-api-creating-an-host-using-azure-service-bus/ which is very interesting but seems to use WCF . I would prefer to use the newer webapi framework instead. Has anyone already wrapped QueueClient as a source for a custom host?
The post that you refer does use the newer Web API framework. Internally, it uses the WCF relay bindings similarly to what happens with Web API self-hosting, which also uses WCF internally.
The code is available here: https://github.com/pmhsfelix/WebApi.Explorations.ServiceBusRelayHost
Hope this helps
Pedro

Using Web Services on SharePoint with Ruby Controllers

I'm completely new to Ruby and Web Services.
I want to tap into SharePoint and retrieve specific data files using available Web Services. Most of the available documentation on the web seems to involve VB IDEs. Can someone please show me how Web Services can be used with ROR controllers? Any beginner examples/literature would be of great help.
Thanks!
This is straight forward SOAP call since sharepoint exposed as a SOAP web service. You can use SOAP4R to achieve this
Refer the links for more info
consuming-soap-services-in-ruby
whats-the-best-way-to-use-soap-with-ruby

What is the difference among Web Service, WCF and Window Service?

I got a lot of theoretical answers from Google that WCF is better than Web Service etc. etc. But I want to know from the programming and implementation point of view. I am very new to coding and want to know that how do we implement all three of these technologies? How are they different and in which scenario we should used which technologies?
Thank you in advance.
A web service is an API that is hosted for access via a network connection - often the internet - and usually accessed over HTTP (or HTTPS).
WCF is a Microsoft .NET development framework that can be used to implement web services. That is, WCF-services are a subset of all web-services.
Windows services are a separate beast entirely: they are long-running programs that run on your local Windows machine, typically with no user interaction and on system accounts. They are used to handle many things in Windows, from low-level driver functionality to software updates.
You're really comparing apples and oranges. A web service is simply a program that you can "call" using the HTTP protocol. Typically, HTTP requests sent to the service contain some XML describing the method called and any parameters. The response from the service likewise contains XML with the return value and any output parameters. It's a little more complicated than this, but it gives you the basic idea.
Windows Communication Foundation (WCF) is a framework for building network services. You can use this framework to build web services if you wish. I suspect that what's tripping you up are the various Visual Studio project templates. You have one for WCF services and one for web services. The web service template builds a web service that runs inside of IIS. The WCF template gives you far more flexibility (you can make a web service as a stand-alone application, for example), but it is far more complicated.
If you're just beginning, I'd start with web service template and IIS-based web services.
MSDN is always a good reference:
Web Service Tutorial:
http://msdn.microsoft.com/en-us/library/8wbhsy70%28VS.80%29.aspx
WCF Tutorial:
http://msdn.microsoft.com/en-us/library/ms734712.aspx
I think its always easier to learn by doing.
Good luck

Resources