Posts
56
Comments
87
Trackbacks
0
April 2011 Entries
Introducing 14 new ASP.NET and Azure code samples released in April

A new release of Microsoft All-In-One Code Framework is available on April 16th. This blog introduces 14 ASP.NET and Azure code samples in the release. The rest new samples will be introduced next week.

Download address: http://1code.codeplex.com/releases/view/64551

Alternatively, you can download the code samples using Sample Browser v3. The new Sample Browser gives you the flexibility to search samples, download samples on demand, manage the downloaded samples in a centralized place, and automatically be notified about new releases.

If it’s the first time that you hear about Microsoft All-In-One Code Framework, please read this Microsoft News Center article http://www.microsoft.com/presspass/features/2011/jan11/01-13codeframework.mspx, or watch the introduction video on YouTube http://www.youtube.com/watch?v=cO5Li3APU58, or read the introduction on our homepage http://1code.codeplex.com/.

---------------------------------------

New Azure Code Samples

CSAzureWorkflowService4, VBAzureWorkflowService4

Downloads
CSAzureWorkflowService4: http://code.msdn.microsoft.com/CSAzureWorkflowService4-2519c571
VBAzureWorkflowService4: http://code.msdn.microsoft.com/VBAzureWorkflowService4-62a20440

This sample demonstrates how to run a WCF Workflow Service on Windows Azure. It uses Visual Studio 2010 and WF 4. While currently Windows Azure platform AppFabric does not contain a Workflow Service component, WCF Workflow Services can be run directly in a Windows Azure Web Role. By default, a Web Role runs under full trust, so it supports the workflow environment.

The workflow in this sample contains a single Receive activity. It compares the service operation's parameter's value with 20, and returns "You've entered a small value." or "You've entered a large value.". The client application invokes the Workflow Service twice, passing a value less than 20, and a value greater than 20.

---------------------------------------

New ASP.NET Code Samples

CSASPNETReverseAJAX, VBASPNETReverseAJAX

Downloads
CSASPNETReverseAJAX: http://code.msdn.microsoft.com/CSASPNETReverseAJAX-7a1f0c2b
VBASPNETReverseAJAX: http://code.msdn.microsoft.com/VBASPNETReverseAJAX-321a68b0

Reverse Ajax is also known as Comet Ajax, Ajax Push, Two-way-web and HTTP server push. This technique persists a HTTP request to allow the server push data to a browser, without requesting the server in an individual time. This sample shows how to use this technique in ASP.NET Ajax.

CSASPNETAutoLogin, VBASPNETAutoLogin

Downloads
CSASPNETAutoLogin: http://code.msdn.microsoft.com/CSASPNETAutoLogin-25cfae2b
VBASPNETAutoLogin: http://code.msdn.microsoft.com/VBASPNETAutoLogin-023c5ab4

The code sample demonstrates creating an ASP.NET web application that supports user login using HttpWebRequest Class without manually filling out username and password textboxes. In the code sample, the Login.aspx page implements the normal login, and the AutoLogin.aspx page implements the programmatic login.

VBASPNETInfiniteLoading

Download: http://code.msdn.microsoft.com/VBASPNETInfiniteLoading-10c3f379

Infinite scroll, has also been called autopagerize, unpaginate, endless pages. But essentially it is pre-fetching content from a subsequent page and adding it directly to the user’s current page. The code sample demonstrates loading a large number of data entries in an XML file. It support infinite scroll with the AJAX technology.

CSASPNETLimitDownloadSpeed, VBASPNETLimitDownloadSpeed

Downloads
CSASPNETLimitDownloadSpeed: http://code.msdn.microsoft.com/CSASPNETLimitDownloadSpeed-819f5d04
VBASPNETLimitDownloadSpeed: http://code.msdn.microsoft.com/VBASPNETLimitDownloadSpeed-fe1dc09a

This project illustrates how to limit the download speed via coding. If you have installed IIS 7.0 we strongly recommend you use the Bit Rate Throttling feature instead of what this code sample demos to limit the download speed. Please refer to http://www.iis.net/download/BitRateThrottling.

CSASPNETServerClock, VBASPNETServerClock

Downloads
CSASPNETServerClock: http://code.msdn.microsoft.com/CSASPNETServerClock-23c659d4
VBASPNETServerClock: http://code.msdn.microsoft.com/VBASPNETServerClock-aff6fbca

This project illustrates how to get the time of the server side and show it to the client page. Sometimes a website needs to show a unified clock on pages to all the visitors. However, if we use JavaScript to handle this target, the time will be different from each client. So we need the server to return the server time and refresh the clock per second via AJAX.

 

If you have any suggestions for the code samples, please email us: onecode@microsoft.com.

Posted On Tuesday, April 19, 2011 8:34 PM | Comments (15)
New Microsoft All-In-One Code Framework “Sample Browser” v3 Released

Microsoft All-In-One Code Framework Sample Browser v3 was released today, targeting to provide a much better code sample download and management experience for developers.

Install: http://1code.codeplex.com/releases/view/64539#DownloadId=229757 (a tiny ClickOnce install)

Background of Sample Browser v3

Last month, we reached the milestone of releasing Sample Browser v2, whose features focus on providing better experience for browsing and searching around 600 code samples of Microsoft All-In-One Code Framework. We heard an important feedback from developers after that release: the sample browser accompanied with all 600 code samples is too large to download and hard to update when new releases come. We took this feedback seriously and make the enhancement in this new version of Sample Browser. In partnership with the MSDN Code Sample Gallery, the code sample download and management experience is now dramatically improved in Sample Browser v3.

Key features of Sample Browser v3

1. "on-demand" sample downloading

The Sample Browser v3 itself is a very tiny and easy-to-install application. It searches for Microsoft All-In-One Code Framework code samples. Based on your demands, you have the flexible choice between downloading individual code sample by clicking the “Download” button next to the code sample:

and downloading all code samples in one click:

2. Sample download management

In Sample Browser v3, you can configure the folder for managing all downloaded code samples

We recommend that you download all code samples to a centralized place, e.g. "D:\Samples". Microsoft All-In-One Code Framework Sample Browser will help you manage the downloaded code samples. If a sample has already been downloaded, Sample Browser displays the “Open” button next to the code sample:

If an update becomes available for a code sample, a [Update Available] button will remind you to download the updated code sample.

3. Auto-update

Thanks to ClickOnce, you will automatically get updates of Microsoft All-In-One Code Framework Sample Browser when its new versions come out.

Besides the above key improvements, the font in the Sample Browser user interface is adjusted to have better contast with the background color.

If you have any feedback, please feel free to let us know by sending email to us at here: onecode@microsoft.com. Your suggestions are very much appreciated.

[Appreciations]

Appreciate Steven Wilssens and his MSDN Code Sample Gallery team for enabling us to implement the on-demand download feature.

Appreciate my team members Leco Lin, Dandan Shi for writing this new version of Sample Browser.

Appreicate Celia Liang, Lixia Dai for creating banners and evagalizing the new Sample Browser.

Posted On Thursday, April 14, 2011 11:35 PM | Comments (1)
Advertise on this site through Lake Quincy Media
Tag Cloud