ASP.NET 4.5 and ASP.NET Core 1 Hosting BLOG

Tutorial and Articles about ASP.NET 4.0 and the latest ASP.NET 4.5 Hosting

ASP.NET 4.5.2 Hosting in Saudi Arabia with ASPHostPortal.com :: What’s New in ASP.NET 4.5.2? – QueueBackgroundWorkItem

clock June 9, 2014 11:56 by author Kenny

ASP.NET is built on the .NET framework, which provides an application program interface (API) for software programmers. The .NET development tools can be used to create applications for both the Windows operating system and the Web. You've probably heard the word ASP.net fairly often these days, especially on developer sites and news. This article will explain what the fuss is all about. ASP.NET is not just the next version of ASP; it is the next era of web development. ASP.NET allows you to use a full featured programming language such as C# (pronounced C-Sharp) or VB.NET to build web applications easily.

New version of ASP.NET, .Net 4.5.2 was released on May 5th. Starting with the recently released version 4.5.2 of the .NET Framework, ASP.NET now supports the HostingEnvironment.QueueBackgroundWorkItem which lets you queue background threads from within an ASP.Net web application.

Well, the new HostingEnvironment.QueueBackgroundWorkItem method that lets you schedule small background work items. ASP.NET tracks these items and prevents IIS from abruptly terminating the worker process until all background work items have completed. These will enable ASP.NET applications to reliably schedule Async work items.

Remember that the QueueBackgroundWorkItem can only be called inside an ASP.NET managed app domain. It won't work if the runtime host is either Internet Explorer or some Windows shell. This is useful for long running tasks that don’t need to complete before returning a response to the user.

 using System;
 using System.Diagnostics;
 using System.Threading;
 using System.Threading.Tasks;
 using System.Web.Hosting;
 using System.Web.Mvc; 
 
 namespace QueueBackgroundWorkItem.Controllers
 {
     public class HomeController : Controller
     {
         // notice that the action did need to be declared async
         public ActionResult Index()
         {
             Func<CancellationToken, Task> workItem = DelayWrite;
             HostingEnvironment.QueueBackgroundWorkItem(workItem);
              // the view is returned before the work item is complete
            return View();
         } 
         // Background work items should use async/await to avoid tying up IIS threads
         // the runtime will provide the cancellation token
         private async Task DelayWrite(CancellationToken cancellationToken)
         {
             // perform a long running operation, e.g. network service call, computation, file IO
             await Task.Delay(5000);
             Trace.WriteLine("Executed from a background work item");         
         }  
     }
 }


ASP.NET 4.5.2 Hosting with ASPHostPortal.com :: New Features of ASP.NET 4.5.2 - Event Tracing Changes

clock June 5, 2014 06:36 by author Kenny

ASP.NET 4.5.2 is the latest ASP.NET version; it is a highly compatible, in-place update to the .NET Framework 4, 4.5 and 4.5.1. The new ASP.NET 4.5.2 some new features that very useful for ASP.NET developer. What's new in this release of .NET 4.5.2 Framework?

  • New APIs for ASP.NET apps;
  • Resizing in Windows Forms controls;
  • New workflow features;
  • Profiling improvements;
  • Debugging improvements;
  • Event tracing changes.

Well, now I will be talking about one of them. It is about “Event tracing”. As you know that Event Tracing for Windows or ETW is an efficient kernel-level tracing facility that lets you log kernel or application-defined events to a log file. It makes you can consume the events in real time or from a log file and use them to debug an application or to determine where performance issues are occurring in the application.

And not only that, ETW has more function again. ETW lets you enable or disable event tracing dynamically, allowing you to perform detailed tracing in a production environment without requiring computer or application restarts. Use ETW when you want to instrument your application, log user or kernel events to a log file, and consume events from a log file or in real time.

In the new ASP.NET 4.5.2 Event Tracing has great change. The new .NET Framework 4.5.2 enables out-of-process, Event Tracing for Windows based activity tracing for a larger surface area. Not only that, this enables Advanced Power Management (APM) vendors to provide lightweight tools that accurately track the costs of individual requests and activities that cross threads. These events are raised only when ETW controllers enable them; therefore, the changes don’t affect previously written ETW code or code that runs with ETW disabled.

Are you interest with other new features in ASP.NET 4.5.2? So just stay tune in this blog. We will always give you up to date news about ASP.NET.



Cheap ASP.NET 4.5 Hosting

We’re a company that works differently to most. Value is what we output and help our customers achieve, not how much money we put in the bank. It’s not because we are altruistic. It’s based on an even simpler principle. "Do good things, and good things will come to you".

Success for us is something that is continually experienced, not something that is reached. For us it is all about the experience – more than the journey. Life is a continual experience. We see the Internet as being an incredible amplifier to the experience of life for all of us. It can help humanity come together to explode in knowledge exploration and discussion. It is continual enlightenment of new ideas, experiences, and passions


Author Link


 

Corporate Address (Location)

ASPHostPortal
170 W 56th Street, Suite 121
New York, NY 10019
United States

Tag cloud

Sign in