European Windows 2019 Hosting BLOG

BLOG about Windows 2019 Hosting and SQL 2019 Hosting - Dedicated to European Windows Hosting Customer

ASP.NET 4 Netherlands Hosting - HostForLIFE.eu :: Write custom ASP.NET HTTP Handler using JavaScript

clock February 4, 2014 05:47 by author Peter

JavaScript is extremely popular language and already has implementations for server-side programming. For example Node.js  - a server-side JavaScript environment that utilizes Goggle's V8 JavaScript Engine.

I am an ASP.NET developer and want to use JavaScript in the ASP.NET environment. I found Javascript .NET project, that bring Google's V8 to the .NET world and I started with a simple task - to write a custom ASP.NET HTTP Handler using JavaScript. (I had done similar task with IronPython before).  If you interested in ASP.NET 4, we recommend you to try HostForLife.eu. We will give the best service at an affordable price. You can start with our lowest price € 3.00/month to host your ASP.NET 4 site.


Setup requirements

1. I want *.js file to be processed on server (like *.aspx or *.ashx)
2. I want to access server side objects (such HttpContext, HttpRequest and HttpResponse) from javascript code.

Implementation

First of all, download Javascript .NET and add the reference to Noesis.Javascript.dll. It embeds Google's V8 and contains an API required to run JavaScript code.

 

Setup custom HTTP Handler in web.config. It will handle any request of *.js file under App folder. I configure it this way to allow other javascript files (not under App folder) to be processed as static content for being used in browser.

Next step - create App folder and  HelloWorld.js file:



Write the single line code:


At this moment I expect this code run on server and produce simple 'Hello World!' html.
But to make it works I have to implement JavaScriptHttpHandlerFactory - the core of all this.

JavaScriptHttpHandlerFactory

Implementation is listed below:

using System.IO;
using System.Web;
using Noesis.Javascript;

namespace Web
{
    public class JavaScriptHttpHandlerFactory : IHttpHandlerFactory
    {
        public IHttpHandler GetHandler(HttpContext context,
                   string requestType, string url, string pathTranslated)
        {
            return new JavaScriptHttpHandler(pathTranslated);
        }

        public void ReleaseHandler(IHttpHandler handler)
        {
        }
    }

    public class JavaScriptHttpHandler : IHttpHandler
    {
        private readonly string pathTranslated;

        public JavaScriptHttpHandler(string pathTranslated)
        {
            this.pathTranslated = pathTranslated;
        }

        public void ProcessRequest(HttpContext context)
        {
            var scriptCode = File.ReadAllText(pathTranslated);

            using (var jsContext = new JavascriptContext())
            {
                jsContext.SetParameter("context", context);
                jsContext.SetParameter("request", context.Request);
                jsContext.SetParameter("response", context.Response);

                try
                {
                    jsContext.Run(scriptCode);
                }
                catch (JavascriptException ex)
                {
                    throw new HttpParseException(ex.Message, ex,
                      pathTranslated, scriptCode, ex.Line);
                }
            }
        }

        public bool IsReusable
        {
            get { return false; }
        }
    }
}

As you may see, implementation of JavaScriptHttpHandlerFactory is pretty simple. Read the js file, create JavascriptContext, setup context parameters and finally execute.

Now when you run HelloWorld.js you get "Hello World!" in browser:

Error handling

But all of this worth nothing if we are not able to debug javascript easily.
Javascript.NET allows us to handle javascript errors and even points to source code line where error was occurred.

I used this feature to expose a javascript error in convenient format of "yellow screen of death":

 

Conclusion

Integration of JavaScript into ASP.NET environment is possible and not so hard

BTW, Javascript.NET is not only technology allows it. There is IronJS wich runs javascript over DLR. May be in one next posts will play with it.



ASP.NET 4 European Hosting :: A Developer's Introduction to Windows Workflow Foundation (WF4) in .NET 4 Beta-Part 3

clock May 5, 2010 06:05 by author Scott

As we promised, we will finish our journey.. This is the final part. If you interested in ASP.NET 4, we recommend you to try HostForLife.eu. We will give the best service at an affordable price. You can start with our lowest price € 3.00/month to host your ASP.NET 4 site.

Workflow Extension

One of the core features of WF, since WF3, has been that it is lightweight enough to be hosted in any .NET application domain.  Because the runtime can execute in different domains and may need customized execution semantics, various aspects of the runtime behaviors need to be externalized from the runtime.  That is where workflow extensions come into play.  Workflow extensions enable you as the developer writing the host code, if you so choose, to add behavior to the runtime by extending it with custom code. 

Two extension types that the WF runtime is aware of are the persistence and tracking extensions. The persistence extension provides the core functionality for saving the state of a workflow to a durable store and retrieving that state when it is needed.  The persistence extension shipping with the framework includes support for Microsoft SQL Server, but extensions can be written to support other database systems or durable stores. 

Persistence

In order to use the persistence extension, you must first setup a database to hold the state, which can be done using the SQL scripts found in %windir%\Microsoft.NET\Framework\v4.0.21006\sql\<language> (e.g. c:\windows\microsoft.net\framework\v4.0.20506\sql\en\). After creating a database, you execute the two scripts to create both the structure (SqlWorkflowInstanceStoreSchema.sql) and the stored procedures (SqlWorkflowInstanceStoreLogic.sql) within the database. 

Tracking

Persistence enables the host to support long running processes, load balance instances across hosts and other fault tolerant behaviors.  However, once the workflow instance has completed, the state in the database is often deleted as it is no longer useful.  In a production environment, having information about what a workflow is currently doing and what it has done is critical to both managing workflows and gaining insight into the business process.  Being able to track what is happening in your application is one of the compelling features of using the WF runtime.  

Tracking consists of two primary components: tracking participants and tracking profiles.  A tracking profile defines what events and data you want the runtime to track.  Profiles can include three primary types of queries:

- ActivityStateQuery – used to identify activity states (e.g. closed) and variables or arguments to extract data
- WorkflowInstanceQuery – used to identify workflow events
- CustomTrackingQuery – used to identify explicit calls to track data, usually within custom activities

Creating Custom Activities

While the base activity library includes a rich palette of activities for interacting with services, objects, and collections, it does not provide activities for interacting with subsystems such as databases, email servers, or your custom domain objects and systems.  Part of getting started with WF4 will be to figure out what core activities you might need or want when building workflows.  The great thing is that activities are composable so as you build core units of work, you can compose them into more coarse grained activities that developers can use in their workflows. 

Activity class hierarcy

For most custom activities, you will either derive from AsyncCodeActivity, CodeActivity, or NativeActivity (or one of the generic variants), or model your activity declaratively.  At a high level, the four base classes can be described as follows: 

- Activity – used to model activities by composing other activities, usually defined using XAML.
- CodeActivity – a simplified base class when you need to write some code to get work done.
- AsyncCodeActivity – used when your activity perform some work asynchronously.
- NativeActivity – when your activity needs access to the runtime internals, for example to schedule other activities or create bookmarks.


Composing activities using Activity designer

When you create a new activity library project, or when you add a new item to a WF project and select the Activity template, what you get is a XAML file with an empty Activity element in it.  In the designer, this presents itself as a design surface where you can create the body of the activity.  To get started with an activity that will have more than one step, it usually helps to drag a Sequence activity in as the Body and then populate that with your actual activity logic as the body represents a single child activity. 

You can think of the activity much like you would a method on a component with arguments.  On the activity itself, you can define arguments, along with their directionality, to define the interface of the activity.  Variables that you want to use within the activity will need to be defined in the activities that comprise the body, such as the root sequence we mentioned previously.  As an example, you can build a NotifyManager activity that composes two simpler activities: GetManager and SendMail. 

Writing custom activity class

If you determine that your activity logic cannot be accomplished by composing other activities, then you can write a code based activity.  When writing activities in code you derive from the appropriate class, define arguments, and then override the Execute method.  The Execute method gets called by the runtime when it is time for the activity to do its work.


Top Reasons to host your ASP.NET 4 Website with HostForLife.eu

There are many reasons why so many people choose HostForLife over any other web hosting provider each year. Whether you’re beginner or an experience webmaster, HostForLife offers the perfect solution for everyone.

You’ll have highly trained, skilled professional technical support people ready, willing, and wanting to help you 24 hours a day. Your web hosting account servers are monitored from three monitoring points, with two alert points, every minute, 24 hours a day, 7 days a week, 365 days a year. The followings are the list of other added-benefits you can find when hosting with us:

1. World-class 24x7 Customer Support
Will your hosting company promptly answer questions and resolve issues - at 3 am on a Sunday? Even some providers claiming “24x7” support will not - but HostForLife will. Our outstanding uptime is backed by true 24x7 customer support. An expertly trained technician will respond to your query within one hour, round the clock. You will also get qualified answers. Other hosting companies typically have very low - level support staff during the night or weekends. HostForLife always has knowledgeable, top - level  support standing by, day or night, to give you the answers you need.

2. Commitment to Outstanding Reliability
Reliability, Stability, and Performance of our servers remain out TOP priority. Even our basic service plans are equipped with standard service level agreements for 99.99% uptime. Advanced options raise the bar to 99.99%. Our state-of-the-art data centers combine servers and SAN storage with full redundancy and operational tools with proprietary service management techniques. Full backup and recovery capabilities are implemented, including redundant power supplies, cooling and connectionsto major data networks.

3. “Right-size” plans for maximum value
HostForLife offers a complete menu of services. IT professionals select only what they need - and leave behind what they don’t. The result is an optimal blend of cost and performance. We offer IT professionals more advanced features and the latest technology - ahead of other hosting companies.

4. Profitable, Stable, Debt-free Business
Financial stability is the bedrock of a hosting provider’s ability to deliver outstanding uptime, cost-effective service plans and world-class 24x7 support.  HostForLife’s customers are assured of our financial integrity and stability - a stark contrast to the ups and downs they may have experienced with other providers.

5. The Best Account Management Tools
HostForLife revolutionized hosting with Plesk Control Panel, a Web-based interfaces that provides customers with 24x7 access to their server and site configuration tools. Some other hosting providers manually execute configuration requests, which can take days. Plesk completes requests in second. It is included free with each hosting account. Renowned for its comprehensive functionally - beyond other hosting control panels - and ease of use, Plesk Control Panel is available only to HostForLife’s customers.

6. 30-Day Money Back Guarantee
HostForLife 30 day money back guarantee ensures you have the ability to cancel your account anytime within your first 30 days under our full 30 day money back guarantee (less one-time account setup free). So what are you waiting for? Sign up today, risk free…

7. Simplicity with FREE 1-Click Installation
HostForLife was designed with ease of use in mind. From one click installations of your favourite website applications to our much talked about drag and drop website builder, you can rest assure your stay with us is going to be a smooth one. HostForLife offers the most extensive set of scripts on the web allowing you to build complicated websites with little or no programming knowledge at all. From blogs to forums to powerful e-commerce solutions, Super Green has something that is right for you.

 



ASP.NET 4 European Hosting :: A Developer's Introduction to Windows Workflow Foundation (WF4) in .NET 4 Beta-Part 2

clock May 4, 2010 08:15 by author Scott

In our last post, we talk about a developer’s introduction to Windows Workflow Foundation (WF4) in .NET 4 Beta. Now, we will continue our journey.... Here we go!!

Building your first workflow

Now that we have covered the core concepts around Activity and data flow, we can create a workflow using these concepts.  We will start with a simple hello world workflow to focus on the concepts rather than the true value proposition of WF.  To start, create a new Unit Test project in Visual Studio 2010.  In order to use the core of WF, add a reference to the System.Activities assembly, and add using statements for System.Activities, System.Activities.Statements, and System.IO in the test class file. 

Tour of the workflow activity palette

With any programming language, you expect to have core constructs for defining your application logic.  When using a higher level development framework like WF, that expectation does not change.   Just as you have statements in .NET languages such as If/Else, Switch and While, for managing control flow you also need those same capabilities when defining your logic in a declarative workflow.  These capabilities come in the form of the base activity library that ships with the framework.  In this section, we will give you a quick tour of the activities that ship with the framework to give you an idea of the functionality provided out of the box.

Activity Primitives and Collection Activities

When moving to a declarative programming model, it is easy to begin wondering how to do common object manipulation tasks that are second nature when writing code.  For those tasks where you find yourself working with objects and needing to set properties, invoke commands or manage a collection of items, there are a set of activities designed specifically with those tasks in mind. 

1. Assign : Assigns a value to a location – enabling setting variables.
2. Delay : Delays the path of execution for a specified amount of time.
3. InvokeMethod/InvokeMethod<T> : Invokes a method on a .NET object or static method on a .NET type, optionally with a return type of T.
4. WriteLine : Writes specified text to a text writer – defaults to Console.Out
5. AddToCollection<T> : Adds an item to a typed collection.
6. RemoveFromCollection<T> : Removes an item from a typed collection.
7. ClearCollection<T> : Removes all items from a collection.
8. ExistsInCollection<T> : Returns a Boolean value indicating if the specified item exists in the collection. 

Control Flow Activities

When defining business logic or business processes, having control of the flow of execution is critical. Control flow activities include basics such as Sequence which provides a common container when you need to execute steps in order, and common branching logic such as the If and Switch activities.  The control flow activities also include looping logic based on data (ForEach) and Conditions(While).  Most important for simplifying complex programming are the parallel activities, which all enable multiple asynchronous activities to get work done at the same time. 

1. Sequence : For executing activities in series
2. While/DoWhile : Executes a child activity while a condition (expression) is true
3. ForEach/ForEach<T> : Iterates over an enumerable collection and executes the child activity once for each item in the collection, waiting for the child to complete before starting the next iteration.  ForEach<T> provides typed access to the individual item driving the iteration.
4. If : Executes one of two child activities depending on the result of the condition (expression).
5. Switch<T> : Evaluates an expression and schedules the child activity with a matching key. 
6. Parallel : Schedules all child activities at once, but also provides a completion condition to enable the activity to cancel any outstanding child activities if certain conditions are met. 
7. ParallelForEach/ParallelForEach<T> : Iterates over an enumerable collection and executes the child activity once for each item in the collection, scheduling all instances at the same time.
8. Pick : Schedules all child PickBranch activities and cancels all but the first to have its trigger complete.  The PickBranch activity has both a Trigger and an Action; each is an Activity.  When a trigger activity completes, the Pick cancels all its other child activities. 

Flowchart

When designing Flowchart workflows there are several constructs that can be used to manage the flow of execution within the Flowchart.  These constructs themselves provide simple steps, simple decision points based on a single condition, or a switch statement.  The real power of the Flowchart is the ability to connect these node types into the desired flow.

1. Flowchart : The container for a series of flow steps, each flow step can be any activity or one of the following constructs, but to be executed, it must be connected within the Flowchart. 
2. FlowDecision : Provides branching logic based on a condition.
3. FlowSwitch / FlowSwitch<T> : Enables multiple branches based on the value of an expression. 
4. FlowStep : Represents a step in the Flowchart with the ability to be connected to other steps. This type is not shown in the toolbox as it is implicitly added by the designer.  This activity wraps other activities in the workflow and provides the navigation semantics for the next step(s) in the workflow. 

It is important to note that while there are specific activities for the Flowchart model, any other activities can be used within the workflow.  Likewise, a Flowchart activity can be added to another activity to provide the execution and design semantics of a Flowchart, within that workflow.  This means you can have a sequence with a several activities and a Flowchart right in the middle. 

Messaging Activities

One of the major focuses in WF4 is tighter integration between WF and WCF.  In terms of workflows, that means activities to model messaging operations such as sending and receiving messages.  There are actually several different activities included in the framework for messaging, each with slightly different functionality and purpose.

1. Send/Receive : One way messaging activities to send or receive a message.  These same activities are composed into request/response style interactions. 
2. ReceiveAndSendReply : Models a service operation that receives a message and sends back a reply. 
3. SendAndReceiveReply : Invokes a service operation and receives the response. 
4. InitializeCorrelation : Allow for initializing correlation values explicitly as part of the workflow logic, rather than extracting the values from a message.
5. CorrelationScope : Defines a scope of execution where a correlation handle is accessible to receive and send activities simplifying the configuration of a handle that is shared by several messaging activities. 
6. TransactedReceiveScope : Enables workflow logic to be included in the same transaction flowed into a WCF operation using the Receive activity.

Transactions and Error Handling

Writing reliable systems can be difficult, and requires that you do a good job of handling errors and managing to keep consistent state in your application.  For a workflow, scopes for managing exception handling and transactions are modeled using activities with properties of type ActivityAction or Activity to enable developers to model error processing logic.  Beyond these common patterns of consistency, WF4 also includes activities which allow you to model  long running distributed  coordination through compensation and confirmation. 

1. CancellationScope : Used to allow the workflow developer to react if a body of work gets cancelled. 
2. TransactionScope :  Enables semantics similar  to using a transaction scope in code by executing all child activities in the scope under a transaction. 
3. TryCatch/Catch<T> : Used to model exception handling and catch typed exceptions. 
4. Throw : Can be used to throw an exception from the activity.  
5. Rethrow : Used to rethrow an exception, generally one that has been caught using the TryCatch activity. 
6. CompensableActivity : Defines the logic for executing child activities that may need to have their actions compensated for after success.  Provides a placeholder for the compensation logic, confirmation logic, and cancellation handling.
7. Compensate : Invokes the compensation handling logic for a compensable activity.
8. Confirm : Invokes the confirmation logic for a compensable activity. 

Options for executing workflows

In order to execute a workflow, you need an Activity that defines the workflow.  There are two typical ways to get an Activity that can be executed: create it in code or read  in a XAML file and deserialize the content into an Activity.  The first option is straightforward and I have already shown several examples.  To load a XAML file you should use the ActivityXamlServices class which provides a static Load method.  Simply pass in a Stream or XamlReader object and you get back the Activity represented in the XAML.  

Once you have an Activity, the simplest way to execute it is by using the WorkflowInvoker class as I did in the unit tests earlier.  The Invoke method of this class has a parameter of type Activity and returns an IDictionary<string, object>.  If you need to pass arguments into the workflow, you first define them on the workflow and then pass the values along with the Activity, into the Invoke method as dictionary of name/value pairs.  Likewise, any Out or In/Out arguments defined on the workflow will be returned as the result of executing the method.  We provide an example of loading a workflow from a XAML file, passing arguments into the workflow and retrieving the resulting output arguments. 

Activity mathWF;

using (Stream mathXaml = File.OpenRead("Math.xaml"))

{

    mathWF = ActivityXamlServices.Load(mathXaml);

}

var outputs = WorkflowInvoker.Invoke(mathWF,

    new Dictionary<string, object> {

    { "operand1", 5 },

    { "operand2", 10 },

    { "operation", "add" } });

Assert.AreEqual<int>(15, (int)outputs["result"], "Incorrect result returned");

Notice in this example that the Activity is loaded from a XAML file and it can still accept and return arguments.  The workflow was developed using the designer in Visual Studio for ease, but could be developed in a custom designer and stored anywhere.  The XAML could be loaded from a database, SharePoint library, or some other store before being handed to the runtime for execution.  

Using the WorkflowInvoker provides the simplest mechanism for running short-lived workflows.  It essentially makes the workflow act like a method call in your application, enabling you to more easily take advantage of all the benefits of WF without having to do a lot of work to host WF itself.  This is especially useful when unit testing your activities and workflows as it reduces the test setup necessary to exercise a component under test. 

Another common hosting class is the WorkflowApplication which provides a safe handle to a workflow that is executing in the runtime, and enables you to manage long running workflows more easily.  With the WorkflowApplication, you can still pass arguments into the workflow in the same way as with the WorkflowInvoker, but you use the Run method to actually start the workflow running.  At this point, the workflow begins executing on another thread and control returns to the calling code. 

Because the workflow is now running asynchronously, in your hosting code you will likely want to know when the workflow completes, or if it throws an exception, etc.  For these types of notifications, the WorkflowApplication class has a set of properties of type Action<T> that can be used like events to add code to react to certain conditions of the workflow execution including: aborted, unhandled exception, completed, idled, and unloaded.  When you execute a workflow using WorkflowApplication, you can use code similar to that shown in Figure below using actions to handle the events. 

WorkflowApplication wf = new WorkflowApplication(new Flowchart1());

wf.Completed = delegate(WorkflowApplicationCompletedEventArgs e)

{

    Console.WriteLine("Workflow {0} complete", e.InstanceId);

};

wf.Aborted = delegate(WorkflowApplicationAbortedEventArgs e)

{

    Console.WriteLine(e.Reason);

};

wf.OnUnhandledException =

  delegate(WorkflowApplicationUnhandledExceptionEventArgs e)

  {

      Console.WriteLine(e.UnhandledException.ToString());

      return UnhandledExceptionAction.Terminate;

  };

wf.Run();

In this example, the goal of the host code, a simple console application, is to notify the user via the console when the workflow completes or if an error occurs.  In a real system, the host will be interested in these events and will likely react to them differently to provide administrators with information about failures or to better manage the instances.

TO BE CONTINUED
Always stay with us…. Don’t go anywhere!! We will continue the final part..

Top Reasons to host your ASP.NET 4 Website with HostForLife.eu

There are many reasons why so many people choose HostForLife over any other web hosting provider each year. Whether you’re beginner or an experience webmaster, HostForLife offers the perfect solution for everyone.

You’ll have highly trained, skilled professional technical support people ready, willing, and wanting to help you 24 hours a day. Your web hosting account servers are monitored from three monitoring points, with two alert points, every minute, 24 hours a day, 7 days a week, 365 days a year. The followings are the list of other added-benefits you can find when hosting with us:

1. World-class 24x7 Customer Support
Will your hosting company promptly answer questions and resolve issues - at 3 am on a Sunday? Even some providers claiming “24x7” support will not - but HostForLife will. Our outstanding uptime is backed by true 24x7 customer support. An expertly trained technician will respond to your query within one hour, round the clock. You will also get qualified answers. Other hosting companies typically have very low - level support staff during the night or weekends. HostForLife always has knowledgeable, top - level  support standing by, day or night, to give you the answers you need.

2. Commitment to Outstanding Reliability
Reliability, Stability, and Performance of our servers remain out TOP priority. Even our basic service plans are equipped with standard service level agreements for 99.99% uptime. Advanced options raise the bar to 99.99%. Our state-of-the-art data centers combine servers and SAN storage with full redundancy and operational tools with proprietary service management techniques. Full backup and recovery capabilities are implemented, including redundant power supplies, cooling and connectionsto major data networks.

3. “Right-size” plans for maximum value
HostForLife offers a complete menu of services. IT professionals select only what they need - and leave behind what they don’t. The result is an optimal blend of cost and performance. We offer IT professionals more advanced features and the latest technology - ahead of other hosting companies.

4. Profitable, Stable, Debt-free Business
Financial stability is the bedrock of a hosting provider’s ability to deliver outstanding uptime, cost-effective service plans and world-class 24x7 support.  HostForLife’s customers are assured of our financial integrity and stability - a stark contrast to the ups and downs they may have experienced with other providers.

5. The Best Account Management Tools
HostForLife revolutionized hosting with Plesk Control Panel, a Web-based interfaces that provides customers with 24x7 access to their server and site configuration tools. Some other hosting providers manually execute configuration requests, which can take days. Plesk completes requests in second. It is included free with each hosting account. Renowned for its comprehensive functionally - beyond other hosting control panels - and ease of use, Plesk Control Panel is available only to HostForLife’s customers.

6. 30-Day Money Back Guarantee
HostForLife 30 day money back guarantee ensures you have the ability to cancel your account anytime within your first 30 days under our full 30 day money back guarantee (less one-time account setup free). So what are you waiting for? Sign up today, risk free…

7. Simplicity with FREE 1-Click Installation
HostForLife was designed with ease of use in mind. From one click installations of your favourite website applications to our much talked about drag and drop website builder, you can rest assure your stay with us is going to be a smooth one. HostForLife offers the most extensive set of scripts on the web allowing you to build complicated websites with little or no programming knowledge at all. From blogs to forums to powerful e-commerce solutions, Super Green has something that is right for you.

 



ASP.NET 4 European Hosting :: A Developer's Introduction to Windows Workflow Foundation (WF4) in .NET 4 Beta-Part 2

clock May 4, 2010 08:15 by author Scott

In our last post, we talk about a developer’s introduction to Windows Workflow Foundation (WF4) in .NET 4 Beta. Now, we will continue our journey.... Here we go!!

Building your first workflow

Now that we have covered the core concepts around Activity and data flow, we can create a workflow using these concepts.  We will start with a simple hello world workflow to focus on the concepts rather than the true value proposition of WF.  To start, create a new Unit Test project in Visual Studio 2010.  In order to use the core of WF, add a reference to the System.Activities assembly, and add using statements for System.Activities, System.Activities.Statements, and System.IO in the test class file. 

Tour of the workflow activity palette

With any programming language, you expect to have core constructs for defining your application logic.  When using a higher level development framework like WF, that expectation does not change.   Just as you have statements in .NET languages such as If/Else, Switch and While, for managing control flow you also need those same capabilities when defining your logic in a declarative workflow.  These capabilities come in the form of the base activity library that ships with the framework.  In this section, we will give you a quick tour of the activities that ship with the framework to give you an idea of the functionality provided out of the box.

Activity Primitives and Collection Activities

When moving to a declarative programming model, it is easy to begin wondering how to do common object manipulation tasks that are second nature when writing code.  For those tasks where you find yourself working with objects and needing to set properties, invoke commands or manage a collection of items, there are a set of activities designed specifically with those tasks in mind. 

1. Assign : Assigns a value to a location – enabling setting variables.
2. Delay : Delays the path of execution for a specified amount of time.
3. InvokeMethod/InvokeMethod<T> : Invokes a method on a .NET object or static method on a .NET type, optionally with a return type of T.
4. WriteLine : Writes specified text to a text writer – defaults to Console.Out
5. AddToCollection<T> : Adds an item to a typed collection.
6. RemoveFromCollection<T> : Removes an item from a typed collection.
7. ClearCollection<T> : Removes all items from a collection.
8. ExistsInCollection<T> : Returns a Boolean value indicating if the specified item exists in the collection. 

Control Flow Activities

When defining business logic or business processes, having control of the flow of execution is critical. Control flow activities include basics such as Sequence which provides a common container when you need to execute steps in order, and common branching logic such as the If and Switch activities.  The control flow activities also include looping logic based on data (ForEach) and Conditions(While).  Most important for simplifying complex programming are the parallel activities, which all enable multiple asynchronous activities to get work done at the same time. 

1. Sequence : For executing activities in series
2. While/DoWhile : Executes a child activity while a condition (expression) is true
3. ForEach/ForEach<T> : Iterates over an enumerable collection and executes the child activity once for each item in the collection, waiting for the child to complete before starting the next iteration.  ForEach<T> provides typed access to the individual item driving the iteration.
4. If : Executes one of two child activities depending on the result of the condition (expression).
5. Switch<T> : Evaluates an expression and schedules the child activity with a matching key. 
6. Parallel : Schedules all child activities at once, but also provides a completion condition to enable the activity to cancel any outstanding child activities if certain conditions are met. 
7. ParallelForEach/ParallelForEach<T> : Iterates over an enumerable collection and executes the child activity once for each item in the collection, scheduling all instances at the same time.
8. Pick : Schedules all child PickBranch activities and cancels all but the first to have its trigger complete.  The PickBranch activity has both a Trigger and an Action; each is an Activity.  When a trigger activity completes, the Pick cancels all its other child activities. 

Flowchart

When designing Flowchart workflows there are several constructs that can be used to manage the flow of execution within the Flowchart.  These constructs themselves provide simple steps, simple decision points based on a single condition, or a switch statement.  The real power of the Flowchart is the ability to connect these node types into the desired flow.

1. Flowchart : The container for a series of flow steps, each flow step can be any activity or one of the following constructs, but to be executed, it must be connected within the Flowchart. 
2. FlowDecision : Provides branching logic based on a condition.
3. FlowSwitch / FlowSwitch<T> : Enables multiple branches based on the value of an expression. 
4. FlowStep : Represents a step in the Flowchart with the ability to be connected to other steps. This type is not shown in the toolbox as it is implicitly added by the designer.  This activity wraps other activities in the workflow and provides the navigation semantics for the next step(s) in the workflow. 

It is important to note that while there are specific activities for the Flowchart model, any other activities can be used within the workflow.  Likewise, a Flowchart activity can be added to another activity to provide the execution and design semantics of a Flowchart, within that workflow.  This means you can have a sequence with a several activities and a Flowchart right in the middle. 

Messaging Activities

One of the major focuses in WF4 is tighter integration between WF and WCF.  In terms of workflows, that means activities to model messaging operations such as sending and receiving messages.  There are actually several different activities included in the framework for messaging, each with slightly different functionality and purpose.

1. Send/Receive : One way messaging activities to send or receive a message.  These same activities are composed into request/response style interactions. 
2. ReceiveAndSendReply : Models a service operation that receives a message and sends back a reply. 
3. SendAndReceiveReply : Invokes a service operation and receives the response. 
4. InitializeCorrelation : Allow for initializing correlation values explicitly as part of the workflow logic, rather than extracting the values from a message.
5. CorrelationScope : Defines a scope of execution where a correlation handle is accessible to receive and send activities simplifying the configuration of a handle that is shared by several messaging activities. 
6. TransactedReceiveScope : Enables workflow logic to be included in the same transaction flowed into a WCF operation using the Receive activity.

Transactions and Error Handling

Writing reliable systems can be difficult, and requires that you do a good job of handling errors and managing to keep consistent state in your application.  For a workflow, scopes for managing exception handling and transactions are modeled using activities with properties of type ActivityAction or Activity to enable developers to model error processing logic.  Beyond these common patterns of consistency, WF4 also includes activities which allow you to model  long running distributed  coordination through compensation and confirmation. 

1. CancellationScope : Used to allow the workflow developer to react if a body of work gets cancelled. 
2. TransactionScope :  Enables semantics similar  to using a transaction scope in code by executing all child activities in the scope under a transaction. 
3. TryCatch/Catch<T> : Used to model exception handling and catch typed exceptions. 
4. Throw : Can be used to throw an exception from the activity.  
5. Rethrow : Used to rethrow an exception, generally one that has been caught using the TryCatch activity. 
6. CompensableActivity : Defines the logic for executing child activities that may need to have their actions compensated for after success.  Provides a placeholder for the compensation logic, confirmation logic, and cancellation handling.
7. Compensate : Invokes the compensation handling logic for a compensable activity.
8. Confirm : Invokes the confirmation logic for a compensable activity. 

Options for executing workflows

In order to execute a workflow, you need an Activity that defines the workflow.  There are two typical ways to get an Activity that can be executed: create it in code or read  in a XAML file and deserialize the content into an Activity.  The first option is straightforward and I have already shown several examples.  To load a XAML file you should use the ActivityXamlServices class which provides a static Load method.  Simply pass in a Stream or XamlReader object and you get back the Activity represented in the XAML.  

Once you have an Activity, the simplest way to execute it is by using the WorkflowInvoker class as I did in the unit tests earlier.  The Invoke method of this class has a parameter of type Activity and returns an IDictionary<string, object>.  If you need to pass arguments into the workflow, you first define them on the workflow and then pass the values along with the Activity, into the Invoke method as dictionary of name/value pairs.  Likewise, any Out or In/Out arguments defined on the workflow will be returned as the result of executing the method.  We provide an example of loading a workflow from a XAML file, passing arguments into the workflow and retrieving the resulting output arguments. 

Activity mathWF;

using (Stream mathXaml = File.OpenRead("Math.xaml"))

{

    mathWF = ActivityXamlServices.Load(mathXaml);

}

var outputs = WorkflowInvoker.Invoke(mathWF,

    new Dictionary<string, object> {

    { "operand1", 5 },

    { "operand2", 10 },

    { "operation", "add" } });

Assert.AreEqual<int>(15, (int)outputs["result"], "Incorrect result returned");

Notice in this example that the Activity is loaded from a XAML file and it can still accept and return arguments.  The workflow was developed using the designer in Visual Studio for ease, but could be developed in a custom designer and stored anywhere.  The XAML could be loaded from a database, SharePoint library, or some other store before being handed to the runtime for execution.  

Using the WorkflowInvoker provides the simplest mechanism for running short-lived workflows.  It essentially makes the workflow act like a method call in your application, enabling you to more easily take advantage of all the benefits of WF without having to do a lot of work to host WF itself.  This is especially useful when unit testing your activities and workflows as it reduces the test setup necessary to exercise a component under test. 

Another common hosting class is the WorkflowApplication which provides a safe handle to a workflow that is executing in the runtime, and enables you to manage long running workflows more easily.  With the WorkflowApplication, you can still pass arguments into the workflow in the same way as with the WorkflowInvoker, but you use the Run method to actually start the workflow running.  At this point, the workflow begins executing on another thread and control returns to the calling code. 

Because the workflow is now running asynchronously, in your hosting code you will likely want to know when the workflow completes, or if it throws an exception, etc.  For these types of notifications, the WorkflowApplication class has a set of properties of type Action<T> that can be used like events to add code to react to certain conditions of the workflow execution including: aborted, unhandled exception, completed, idled, and unloaded.  When you execute a workflow using WorkflowApplication, you can use code similar to that shown in Figure below using actions to handle the events. 

WorkflowApplication wf = new WorkflowApplication(new Flowchart1());

wf.Completed = delegate(WorkflowApplicationCompletedEventArgs e)

{

    Console.WriteLine("Workflow {0} complete", e.InstanceId);

};

wf.Aborted = delegate(WorkflowApplicationAbortedEventArgs e)

{

    Console.WriteLine(e.Reason);

};

wf.OnUnhandledException =

  delegate(WorkflowApplicationUnhandledExceptionEventArgs e)

  {

      Console.WriteLine(e.UnhandledException.ToString());

      return UnhandledExceptionAction.Terminate;

  };

wf.Run();

In this example, the goal of the host code, a simple console application, is to notify the user via the console when the workflow completes or if an error occurs.  In a real system, the host will be interested in these events and will likely react to them differently to provide administrators with information about failures or to better manage the instances.

TO BE CONTINUED
Always stay with us…. Don’t go anywhere!! We will continue the final part..

Top Reasons to host your ASP.NET 4 Website with HostForLife.eu

There are many reasons why so many people choose HostForLife over any other web hosting provider each year. Whether you’re beginner or an experience webmaster, HostForLife offers the perfect solution for everyone.

You’ll have highly trained, skilled professional technical support people ready, willing, and wanting to help you 24 hours a day. Your web hosting account servers are monitored from three monitoring points, with two alert points, every minute, 24 hours a day, 7 days a week, 365 days a year. The followings are the list of other added-benefits you can find when hosting with us:

1. World-class 24x7 Customer Support
Will your hosting company promptly answer questions and resolve issues - at 3 am on a Sunday? Even some providers claiming “24x7” support will not - but HostForLife will. Our outstanding uptime is backed by true 24x7 customer support. An expertly trained technician will respond to your query within one hour, round the clock. You will also get qualified answers. Other hosting companies typically have very low - level support staff during the night or weekends. HostForLife always has knowledgeable, top - level  support standing by, day or night, to give you the answers you need.

2. Commitment to Outstanding Reliability
Reliability, Stability, and Performance of our servers remain out TOP priority. Even our basic service plans are equipped with standard service level agreements for 99.99% uptime. Advanced options raise the bar to 99.99%. Our state-of-the-art data centers combine servers and SAN storage with full redundancy and operational tools with proprietary service management techniques. Full backup and recovery capabilities are implemented, including redundant power supplies, cooling and connectionsto major data networks.

3. “Right-size” plans for maximum value
HostForLife offers a complete menu of services. IT professionals select only what they need - and leave behind what they don’t. The result is an optimal blend of cost and performance. We offer IT professionals more advanced features and the latest technology - ahead of other hosting companies.

4. Profitable, Stable, Debt-free Business
Financial stability is the bedrock of a hosting provider’s ability to deliver outstanding uptime, cost-effective service plans and world-class 24x7 support.  HostForLife’s customers are assured of our financial integrity and stability - a stark contrast to the ups and downs they may have experienced with other providers.

5. The Best Account Management Tools
HostForLife revolutionized hosting with Plesk Control Panel, a Web-based interfaces that provides customers with 24x7 access to their server and site configuration tools. Some other hosting providers manually execute configuration requests, which can take days. Plesk completes requests in second. It is included free with each hosting account. Renowned for its comprehensive functionally - beyond other hosting control panels - and ease of use, Plesk Control Panel is available only to HostForLife’s customers.

6. 30-Day Money Back Guarantee
HostForLife 30 day money back guarantee ensures you have the ability to cancel your account anytime within your first 30 days under our full 30 day money back guarantee (less one-time account setup free). So what are you waiting for? Sign up today, risk free…

7. Simplicity with FREE 1-Click Installation
HostForLife was designed with ease of use in mind. From one click installations of your favourite website applications to our much talked about drag and drop website builder, you can rest assure your stay with us is going to be a smooth one. HostForLife offers the most extensive set of scripts on the web allowing you to build complicated websites with little or no programming knowledge at all. From blogs to forums to powerful e-commerce solutions, Super Green has something that is right for you.

 



ASP.NET 4 European Hosting :: A Developer's Introduction to Windows Workflow Foundation (WF4) in .NET 4 Beta-Part 1

clock April 29, 2010 07:06 by author Scott

Overview

As software developers know, writing applications can be challenging, and we are constantly looking for tools and frameworks to simplify the process and help us focus on the business challenges we are trying to solve.  We have moved from writing code in machine languages such as assembler to higher level languages like C# and Visual Basic that ease our development, remove lower level concerns such as memory management, and increase our productivity as developers.  For Microsoft developers, the move to .NET allows the Common Language Runtime (CLR) to allocate memory, cleanup unneeded objects and handle low level constructs like pointers. 

Much of the complexity of an application lives in the logic and processing that goes on behind the scenes.  Issues such as asynchronous or parallel execution and generally coordinating the tasks to respond to user requests or service requests can quickly lead application developers back down into the low level coding of handles, callbacks, synchronization etc.  As developers, we need the same power and flexibility of a declarative programming model for the internals of an application as we have for the user interface in Windows Presentation Foundation (WPF).    Windows Workflow Foundation (WF) provides the declarative framework for building application and service logic and gives developers a higher level language for handling asynchronous, parallel tasks and other complex processing.

Having a runtime to manage memory and objects has freed us to focus more on the important business aspects of writing code.  Likewise, having a runtime that can manage the complexities of coordinating asynchronous work provides a set of features that improves developer productivity.  WF is a set of tools for declaring your workflow (your business logic), activities to help define the logic and control flow, and a runtime for executing the resulting application definition.  In short, WF is about using a higher level language for writing applications, with the goal of making developers more productive, applications easier to manage, and change quicker to implement.  The WF runtime not only executes your workflows for you, it also provides services and features important when writing application logic such persistence of state, bookmarking and resumption of business logic, all of which lead to thread and process agility enabling scale up and scale out of business processes. 

What’s New in WF 4

In version 4 of the Microsoft® .NET Framework, Windows Workflow Foundation introduces a significant amount of change from the previous versions of the technology that shipped as part of .NET 3.0 and 3.5.  In fact, the team revisited the core of the programming model, runtime and tooling and has re-architected each one to increase performance and productivity as well as to address the important feedback garnered from customer engagements using the previous versions.  The significant changes made were necessary to provide the best experience for developers adopting WF and to enable WF to continue to be a strong foundational component that you can build on in your applications. I will introduce the high level changes here, and throughout the paper each topic will get more in depth treatment. 

Before we continue, it is important to understand that backwards compatibility was also a key goal in this release.  The new framework components are found primarily in the System.Activities.* assemblies while the backwards compatible framework components are found in the System.Workflow.* assemblies.  The System.Workflow.* assemblies are part of the .NET Framework 4 and provide complete backward compatibility so you can migrate your application to .NET 4 with no changes to your workflow code. Throughout this paper we will use the name WF4 to refer to the new components found in the System.Activities.* assemblies and WF3 to refer to the components found in the System.Workflow.* assemblies. 

Designers

One of the most visible areas of improvement is in the workflow designer. Usability and performance were key goals for the team for the VS 2010 release.  The designer now supports the ability to work with much larger workflows without a degradation in performance and designers are all based on Windows Presentation Foundation (WPF), taking full advantage of the rich user experience one can build with the declarative UI framework.  Activity developers will use XAML to define the way their activities look and interact with users in a visual design environment.  In addition, rehosting the workflow designer in your own applications to enable non-developers to view and interact with your workflows is now much easier. 

Data Flow

In WF3, the flow of data in a workflow was opaque.  WF4 provides a clear, concise model for data flow and scoping in the use of arguments and variables.  These concepts, familiar to all developers, simplify both the definition of data storage, as well as the flow of the data into and out of workflows and activities.  The data flow model also makes more obvious the expected inputs and outputs of a given activity and improves performance of the runtime as data is more easily managed.
 

Flowchart

A new control flow activity called Flowchart has been added to make it possible for developers to use the Flowchart model to define a workflow.  The Flowchart more closely resembles the concepts and thought processes that many analysts and developers go through when creating solutions or designing business processes.  Therefore, it made sense to provide an activity to make it easy to model the conceptual thinking and planning that had already been done.  The Flowchart enables concepts such as returning to previous steps and splitting logic based on a single condition, or a Switch / Case logic. 

Programming Model

The WF programming model has been revamped to make it both simpler and more robust.  Activity is the core base type in the programming model and represents both workflows and activities.  In addition, you no longer need to create a WorkflowRuntime to invoke a workflow, you can simply create an instance and execute it, simplifying unit testing and application scenarios where you do not want to go through the trouble of setting up a specific environment.  Finally, the workflow  programming model becomes a fully declarative composition of activities, with no code-beside, simplifying workflow authoring.

Windows Communication Foundation (WCF) Integration

The benefits of WF most certainly apply to both creating services and consuming or coordinating service interactions.  A great deal of effort went into enhancing the integration between WCF and WF.  New messaging activities, message correlation, and improved hosting support, along with fully declarative service definition are the major areas of improvement. 

Getting Started with Workflow

The best way to understand WF is to start using it and applying the concepts.  We will cover several core concepts around the underpinnings of workflow, and then walk through creating a few simple workflows to illustrate how those concepts relate to each other. 

Workflow Structure

Activities are the building blocks of WF and all activities ultimately derive from Activity.  A terminology note - Activities are a unit of work in WF. Activities can be composed together into larger Activities. When an Activity is used as a top-level entry point, it is called a "Workflow", just like Main is simply another function that represents a top level entry point to CLR programs. This for example:

Sequence s = new Sequence

{

    Activities = {

        new WriteLine {Text = "Hello"},

        new Sequence {

            Activities =

            {

                new WriteLine {Text = "Workflow"},

                new WriteLine {Text = "World"}

            }

        }

    }

};

Data flow in workflows

The first thought most people have when they think about workflow is the business process or the flow of the application.  However, just as critical as the flow is the data that drives the process and the information that is collected and stored during the execution of the workflow.  In WF4, the storage and management of data has been a prime area of design consideration. 

There are three main concepts to understand with regard to data: Variables, Arguments, and Expressions.  The simple definitions for each are that variables are for storing data, arguments are for passing data, and expressions are for manipulating data. 

Variables-storing data

Variables in workflows are very much like the variables you are used to in imperative languages: they describe a named location for data to be stored and they follow certain scoping rules.  To create a variable, you first determine at what scope the variable needs to be available.  Just as you might have variables in code that are available at the class or method level, your workflow variables can be defined at different scopes.

Arguments-passing data

Arguments are defined on activities and define the flow of data into and out of the activity.  You can think of arguments to activities much like you use arguments to methods in imperative code.  Arguments can be In, Out, or In/Out and have a name and type.  When building a workflow, you can define arguments on the root activity which enables data to be passed into your workflow when it is invoked.  You define arguments on the workflow much as you do variables using the argument window. 

As you add activities to your workflow, you will need to configure the arguments for the activities, and this is primarily done by referencing in-scope variables or using expressions, which I will discuss next.  In fact, the Argument base class contains an Expression property which is an Activity that returns a value of the argument type, so all of these options are related and rely on Activity. 

Expression-acting on data

Expressions are activities you can use in your workflow to operate on data.  Expressions can be used in places where you use Activity and are interested in a return value, which means you can use expressions in setting arguments or to define conditions on activities like the While or If activities.  Remember that most things in WF4 derive from Activity and expressions are no different, they are a derivative of Activity<TResult> meaning they return a value of a specific type.  In addition, WF4 includes several common expressions for referring to variables and arguments as well as Visual Basic expressions.  Because of this layer of specialized expressions, the expressions you use to define arguments can include code, literal values, and variable references. 

TO BE CONTINUED
Do you want to see the next?? Stay with HostForLife.eu.

Top Reasons to host your ASP.NET 4 Website with HostForLife.eu

There are many reasons why so many people choose HostForLife over any other web hosting provider each year. Whether you’re beginner or an experience webmaster, HostForLife offers the perfect solution for everyone.

You’ll have highly trained, skilled professional technical support people ready, willing, and wanting to help you 24 hours a day. Your web hosting account servers are monitored from three monitoring points, with two alert points, every minute, 24 hours a day, 7 days a week, 365 days a year. The followings are the list of other added-benefits you can find when hosting with us:

1. World-class 24x7 Customer Support
Will your hosting company promptly answer questions and resolve issues - at 3 am on a Sunday? Even some providers claiming “24x7” support will not - but HostForLife will. Our outstanding uptime is backed by true 24x7 customer support. An expertly trained technician will respond to your query within one hour, round the clock. You will also get qualified answers. Other hosting companies typically have very low - level support staff during the night or weekends. HostForLife always has knowledgeable, top - level  support standing by, day or night, to give you the answers you need.

2. Commitment to Outstanding Reliability
Reliability, Stability, and Performance of our servers remain out TOP priority. Even our basic service plans are equipped with standard service level agreements for 99.99% uptime. Advanced options raise the bar to 99.99%. Our state-of-the-art data centers combine servers and SAN storage with full redundancy and operational tools with proprietary service management techniques. Full backup and recovery capabilities are implemented, including redundant power supplies, cooling and connectionsto major data networks.

3. “Right-size” plans for maximum value
HostForLife offers a complete menu of services. IT professionals select only what they need - and leave behind what they don’t. The result is an optimal blend of cost and performance. We offer IT professionals more advanced features and the latest technology - ahead of other hosting companies.

4. Profitable, Stable, Debt-free Business
Financial stability is the bedrock of a hosting provider’s ability to deliver outstanding uptime, cost-effective service plans and world-class 24x7 support.  HostForLife’s customers are assured of our financial integrity and stability - a stark contrast to the ups and downs they may have experienced with other providers.

5. The Best Account Management Tools
HostForLife revolutionized hosting with Plesk Control Panel, a Web-based interfaces that provides customers with 24x7 access to their server and site configuration tools. Some other hosting providers manually execute configuration requests, which can take days. Plesk completes requests in second. It is included free with each hosting account. Renowned for its comprehensive functionally - beyond other hosting control panels - and ease of use, Plesk Control Panel is available only to HostForLife’s customers.

6. 30-Day Money Back Guarantee
HostForLife 30 day money back guarantee ensures you have the ability to cancel your account anytime within your first 30 days under our full 30 day money back guarantee (less one-time account setup free). So what are you waiting for? Sign up today, risk free…

7. Simplicity with FREE 1-Click Installation
HostForLife was designed with ease of use in mind. From one click installations of your favourite website applications to our much talked about drag and drop website builder, you can rest assure your stay with us is going to be a smooth one. HostForLife offers the most extensive set of scripts on the web allowing you to build complicated websites with little or no programming knowledge at all. From blogs to forums to powerful e-commerce solutions, Super Green has something that is right for you.

 



ASP.NET 4 European Hosting :: What's New in the Visual Studio 2010 Editor

clock April 27, 2010 05:45 by author Scott

Are you looking for an affordable hosting service? Are you looking for good service at affordable prices? Try HostForLife.eu, only with € 3.00/month, you can get a reasonable price with best service. This topic contains only brief information about Visual Studio 2010, if you want to be more familiar with Visual Studio 2010, you should try HostForLife.eu.

New in Visual Studio 2010

Enhanced Docking Behavior

Document windows are no longer constrained to the editing frame of the integrated development environment (IDE). You can now dock document windows to the edges of the IDE, or move them anywhere on the desktop (this includes a second monitor). If two related document windows are open and visible, for example, a designer view and an editor view of the same Windows Form, changes that were made in one window will immediately take effect in the other window.

Tool windows can now move freely between docking at the edges of the IDE, floating outside the IDE, or filling part or all of the document frame. They remain in a dockable state at all times.

Zoom

In any code editing window or text editing window, you can quickly zoom in or out by pressing and holding the CTRL key and moving the scroll wheel on the mouse. You can also zoom textual tool windows, for example, the Output window. The zoom feature does not work on design surfaces or on tool windows that contain icons, for example, the Toolbox or Solution Explorer.

Box Selection

In previous releases of Visual Studio, you could select a rectangular region of text by holding down the Alt key while selecting a region with the mouse. You could then copy or delete the selected text. VS 2010 adds the following new capabilities to the box selection feature:

- Text insertion: Type into a box selection to insert the new text on every selected line.
- Paste: Paste the contents of one box selection into another.
- Zero-length boxes: Make a vertical selection zero characters wide to create a multi-line insertion point for new or copied text.

You can use these capabilities to rapidly operate on groups of statements, such as changing access modifiers, setting fields, or adding comments.

Call Hierarcy

Call Hierarchy, which is available in Visual C# and Visual C++, displays the following parts of your code so that you can navigate through it more effectively:

- Calls to and from a selected method, property, or constructor.
- Implementations of an interface member.
- Overrides of a virtual or abstract member.

This can help you better understand how code flows, evaluate the effects of changes, and explore possible execution paths by examining complex chains of method calls and other entry points in several levels of code.

Call Hierarchy is available at design time, unlike the call stack that is displayed by the debugger.

The member name appears in a pane of the Call Hierarchy window. If you expand the member node, Calls To member name and Calls From member name subnodes appear. If you expand the Calls To node, all members that call the selected member are displayed. If you expand the Calls From node, all members that are called by the selected member are displayed. You can also expand the subnode members into Calls To and Calls From nodes. This lets you navigate into the stack of callers.

Navigate to

You can use the Navigate To feature to search for a symbol or file in the source code.

Navigate To lets you find a specific location in the solution or explore elements in the solution. It helps you pick a good set of matching results from a query.

You can search for keywords that are contained in a symbol by using Camel casing and underscore characters to divide the symbol into keywords.

Highlighting References

When you click a symbol in the source code, all instances of that symbol are highlighted in the document.

The highlighted symbols may include declarations and references, and many other symbols that Find All References would return. These include the names of classes, objects, variables, methods, and properties.

In Visual Basic code, keywords for many control structures are also highlighted.

To move to the next or the previous highlighted symbol, press CTRL+SHIFT+DOWN ARROW or CTRL+SHIFT+UP ARROW.

Generate from Usage

The Generate From Usage feature lets you use classes and members before you define them. You can generate a stub for any undefined class, constructor, method, property, field, or enum that you want to use but have not yet defined. You can generate new types and members without leaving your current location in code, This minimizes interruption to your workflow.

Generate From Usage supports programming styles such as test-first development.

IntelliSense Suggestion Mode

IntelliSense now provides two alternatives for IntelliSense statement completion, completion mode and suggestion mode. Use suggestion mode for situations where classes and members are used before they are defined.

In suggestion mode, when you type in the editor and then commit the entry, the text you typed is inserted into the code. When you commit an entry in completion mode, the editor shows the entry that is highlighted on the members list.

When an IntelliSense window is open, you can press CTRL+ALT+SPACEBAR to toggle between completion mode and suggestion mode.

Top Reasons to host your ASP.NET 4 Website with HostForLife.eu

There are many reasons why so many people choose HostForLife over any other web hosting provider each year. Whether you’re beginner or an experience webmaster, HostForLife offers the perfect solution for everyone.

You’ll have highly trained, skilled professional technical support people ready, willing, and wanting to help you 24 hours a day. Your web hosting account servers are monitored from three monitoring points, with two alert points, every minute, 24 hours a day, 7 days a week, 365 days a year. The followings are the list of other added-benefits you can find when hosting with us:

1. World-class 24x7 Customer Support
Will your hosting company promptly answer questions and resolve issues - at 3 am on a Sunday? Even some providers claiming “24x7” support will not - but HostForLife will. Our outstanding uptime is backed by true 24x7 customer support. An expertly trained technician will respond to your query within one hour, round the clock. You will also get qualified answers. Other hosting companies typically have very low - level support staff during the night or weekends. HostForLife always has knowledgeable, top - level  support standing by, day or night, to give you the answers you need.

2. Commitment to Outstanding Reliability
Reliability, Stability, and Performance of our servers remain out TOP priority. Even our basic service plans are equipped with standard service level agreements for 99.99% uptime. Advanced options raise the bar to 99.99%. Our state-of-the-art data centers combine servers and SAN storage with full redundancy and operational tools with proprietary service management techniques. Full backup and recovery capabilities are implemented, including redundant power supplies, cooling and connectionsto major data networks.

3. “Right-size” plans for maximum value
HostForLife offers a complete menu of services. IT professionals select only what they need - and leave behind what they don’t. The result is an optimal blend of cost and performance. We offer IT professionals more advanced features and the latest technology - ahead of other hosting companies.

4. Profitable, Stable, Debt-free Business
Financial stability is the bedrock of a hosting provider’s ability to deliver outstanding uptime, cost-effective service plans and world-class 24x7 support.  HostForLife’s customers are assured of our financial integrity and stability - a stark contrast to the ups and downs they may have experienced with other providers.

5. The Best Account Management Tools
HostForLife revolutionized hosting with Plesk Control Panel, a Web-based interfaces that provides customers with 24x7 access to their server and site configuration tools. Some other hosting providers manually execute configuration requests, which can take days. Plesk completes requests in second. It is included free with each hosting account. Renowned for its comprehensive functionally - beyond other hosting control panels - and ease of use, Plesk Control Panel is available only to HostForLife’s customers.

6. 30-Day Money Back Guarantee
HostForLife 30 day money back guarantee ensures you have the ability to cancel your account anytime within your first 30 days under our full 30 day money back guarantee (less one-time account setup free). So what are you waiting for? Sign up today, risk free…

7. Simplicity with FREE 1-Click Installation
HostForLife was designed with ease of use in mind. From one click installations of your favourite website applications to our much talked about drag and drop website builder, you can rest assure your stay with us is going to be a smooth one. HostForLife offers the most extensive set of scripts on the web allowing you to build complicated websites with little or no programming knowledge at all. From blogs to forums to powerful e-commerce solutions, Super Green has something that is right for you.

 



About HostForLIFE

HostForLIFE is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

We have offered the latest Windows 2019 Hosting, ASP.NET 5 Hosting, ASP.NET MVC 6 Hosting and SQL 2019 Hosting.


Month List

Tag cloud

Sign in