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: https://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 https://www.microsoft.com/presspass/features/2011/jan11/01-13codeframework.mspx, or watch the introduction video on YouTube https://www.youtube.com/watch?v=cO5Li3APU58, or read the introduction on our homepage https://1code.codeplex.com/.

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

New Azure Code Samples

CSAzureWorkflowService4, VBAzureWorkflowService4

Downloads
CSAzureWorkflowService4: https://code.msdn.microsoft.com/CSAzureWorkflowService4-2519c571
VBAzureWorkflowService4: https://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.

For more Windows Azure code samples, please refer to the Windows Azure Code Samples Index.

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

New ASP.NET Code Samples

CSASPNETReverseAJAX, VBASPNETReverseAJAX

Downloads
CSASPNETReverseAJAX: https://code.msdn.microsoft.com/CSASPNETReverseAJAX-7a1f0c2b
VBASPNETReverseAJAX: https://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: https://code.msdn.microsoft.com/CSASPNETAutoLogin-25cfae2b
VBASPNETAutoLogin: https://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: https://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: https://code.msdn.microsoft.com/CSASPNETLimitDownloadSpeed-819f5d04
VBASPNETLimitDownloadSpeed: https://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 https://www.iis.net/download/BitRateThrottling.

CSASPNETServerClock, VBASPNETServerClock

Downloads
CSASPNETServerClock: https://code.msdn.microsoft.com/CSASPNETServerClock-23c659d4
VBASPNETServerClock: https://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.