Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 24, 2012 06:18 AM by Young Yang - MSFT
Apr 17, 2012 03:32 PM|LINK
After a long time I need to develop a web based solution. (I did some web apps using ASP.NET 1.1 and 2.0 then, now a days I'm with Winforms and WPF)
Will it possible to use same MVC4 web application to create a sliverlight client and HTML, jquery client?
To me it looks like developing Web Api using MVC4 and then consuming it in silverlight and jquery clients is the way to go.
What options I have?
Based on my background please suggest some "Get started" links.
Apr 17, 2012 03:39 PM|LINK
Yes you can definitely host a silverlight application in an mvc4 web site and use WebApi to provide the services needed for the application. Silverlight allows you to interact with web api by providing json serialization utilities.
curve. Here's a great video on single page applications
Also, take a look at the following:
You can learn a lot about WebAPI here
Here's a great video series on Web Api
Apr 17, 2012 03:58 PM|LINK
Thanks for the quick reply.
Can you provide me some information/links about, how to secure the transportation(ssl).
Apr 17, 2012 08:04 PM|LINK
It's no different than securing a regular web application. You would use ssl, authorization/authentication. If you need a more robust and secure service solution, then instead of a RESTful service you might want to consider RIA services or WCF.
Apr 18, 2012 07:50 AM|LINK
1. What makes RIA and WCF services more robust and secure?
2. Why REST services are not robust even if they support ssl, authorization/authentication.
3. With my initial idea, I thought I just need to project in VS 1. For ASP.NET web app 2.SL Client
4. If I take WCF appraoch I need 4 projects 1.WCF 2.SL Client 3.SL Client Web (to host sl client) 4.ASP.NET web app(Razor) for html client.
I feel the WCF approah needs more effort and less efficient as it need SOAP stuff on the communication stack.
Apr 24, 2012 06:18 AM|LINK
Actually RIA Services are usually used in RAD, where you want to create a solution quickly, without too many custom code. It works best for Silverlight clients, as in most cases it is not needed to write a single line of code to create a fully functional
You can definitely use ASP.NET Web API for your scenario. Using SSL in ASP.NET Web API is no different from normal ASP.NET application. You can configure the web server (such as IIS) to support SSL. If authentication/authorization is required, you can also
use existing security mechanisms in ASP.NET, such as membership/role. There’re also a bunch of other authentication mechanisms. Please refer to
http://blogs.msdn.com/b/astoriateam/archive/tags/authentication/ for a series of blog articles about REST security. While they focus on OData, the same solutions can be used in other
Hope this helpful