I am fairly new to azure, wcf, asp.net and json. I have experience with WPF.
I would like to create a service on the Azure Cloud. There are some demands to this service:
Authentication/ASP.net/Session: When an application, for example a WPF application, WP app/whatever, wishes to use the service, it has to authenticate - and be authenticated for the rest of the session. The authentication is done with windows live id (I guess this is where asp.net comes in?).
WCF: I would like to use a WCF service to expose the methods. How to I "hide" the WCF services from the world, until the user is logged in?
Json: Because I want to use this for (hopefully in the future) WPF apps, WP apps, android apps, iphone apps etc. I would like to use Json.
Azure: I would like to host i all on azure.
For a start, I would just like to create a wpf application with the following:
I am very open to suggestions and ideas.
What I need help for is tutorials, walkthroughs, samples, guidance etc. to get me started on this project. I have looked through some tutorials, samples etc., but it is always missing of the components.
Can someone point me in the right direction / offer some advice?
I'd recommend going through some of the Windows Azure tutorials . The main .NET Web App tutorial (linked) shows you how to handle 1 & 2, and the Multi-Tier Application Tutorial covers 3 & 4 fairly well (though I don't believe using JSON). Once you understand that, it should be straightforward to adapt to your needs.
Here is my take on how you can start:
Authentication/ASP.net/Session: - With Azure you can use OpenID based authentication using ACS so look for using ACS on this regard. For ASP.NET session specific requirement you can use Windows Azure Cache which is best and cost effective for such scenarios.
WCF : Good scenario and you can ASP.NET (and/or MVCx) web Role for users to come to your site and then authentication them using OpenID and once authentication you can let them access WCF endpoint or anywere you would want to by setting this in your ACS configuration .
JSON : You sure can use JSON with ASP.NET . You can use jQuery to control the UI and then have it call commands through AJAX/JSON. It also allows you to update a page with new content without having to refresh the page. There could be many more way to use it.
Windows Azure: : Now sure how much you know about Windows Azure but you should have basic knowledge of SDK, Deployment process etc.
Finally you may try something as below:
Hope this helps!!
Regarding session state: As I mentioned in this StackOverflow answer, you have multiple options. @Avkash points out one option, to use the Windows Azure Cache. You need to be aware that the cache, being a multi-tenant service, has specific hourly limits on your cache consumption. Depending on user demand / load, you could exceed hourly quota and have no access to cache until the following hour (which means you need to plan for having a larger cache than initially needed). More info on Cache and related quotas, here . Note that pricing begins at $45 for a 128MB cache.
You may also manage session state via SQL Azure. This has no transactional quota, and pricing starts at $4.99 for 100MB. See Nate Totten's blog post about using SQL Azure for session state.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.