European Windows 2019 Hosting BLOG

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

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.

 



IIS 7.5 European Hosting :: Configuring Windows Server 2008 Core Basic Networking Settings

clock May 4, 2010 08:08 by author Scott

Like any other server, Server Core machines must be properly configured to be able to communicate on your network. Some of these settings include:

- Configuring an IP address
- Configuring an administrator's password
- Configuring a server name
- Enabling remote MMC snap-in management
- Enabling remote RDP connections
- Enabling remote Windows Firewall management
- Enabling remote shell management
- Activating the server
- Joining a domain
- Configuring Windows Updates
- Configuring error reporting
- Adding server roles and features

And other tasks.

Before you start, you need to configure the server's IP address.

To set the server with a static IP address

1. At a command prompt, type the following:

netsh interface ipv4 show interfaces

2. Look at the number shown in the Idx column of the output for your network adapter. If your computer has more than one network adapter, make a note of the number corresponding to the network adapter for which you wish to set a static IP address.

3. At the command prompt, type:

netsh interface ipv4 set address name=”” source-static address= mask = gateway =

Where:
- ID is the number from step 2 above
- StaticIP is the static IP address that you are setting
- SubnetMask is the subnet mask for the IP address
- DefaultGateway is the default gateway

4. At the command prompt, type:

netsh interface ip4 add dnsserver name=”” address= index= 1

Where:
- ID is the number from step 2 above
- DNSIP is the IP address of your DNS server

5. Repeat step 4 for each DNS server that you want to set, incrementing the index= number each time.

6. Verify by typing ipconfig /all and checking that all the addresses are correct.

To set the administrative password in Windows Server 2008

1. At a command prompt, type the following:

net user administrator *

2. When prompted to enter the password, type the new password for the administrator user account and press ENTER.

3. When prompted, retype the password and press ENTER.

Next, you might want to change the computer's name, as the default name is a random-generated name (unless configured through an answer file)

To change the name of the server

1. Determine the current name of the server with the hostname or ipconfig /all commands.

2. At a command prompt, type:

netdom rename computer /NewName:

3. Restart the computer by typing the following at a command prompt:

shutdown /r /t 0

To manage a server running a Server Core Installation by using the Windows Remote Shell

1. To enable Windows Remote Shell on a server running a Server Core installation, type the following command at a command prompt:

WinRm quickconfig

2. Click Y to accept the default settings. Note: The WinRM quickconfig setting enables a server running a Server Core installation to accept Windows Remote Shell connections.

3. On the remote computer, at a command prompt, use WinRS.exe to run commands on a server running a Server Core installation. For example, to perform a directory listing of the Windows folder, type:

Winrs –r: cmd

Where ServerName is the name of the server running a Server Core installation.

4. You can now type any command that you require, it will be executed on the remote computer.

To activate the server

1. At a command prompt, type:

slmgr.vbs -ato

If activation is successful, no message will return in the command prompt.

To activate the server remotely

1. At a command prompt, type:

cscript slmgr.vbs –ato

2. Retrieve the GUID of the computer by typing:

cscript slmgr.vbs –did

3. Type

cscript slmgr.vbs –dli

4. Verify that License status is set to Licensed (activated).

To join a Windows 2008 server to a domain

1. At a command prompt, type:

netdom join /domain: /userd: /password:*

Where:
- ComputerName is the name of the server that is running the Server Core installation.
- DomainName is the name of the domain to join.
- UserName is a domain user account with permission to join the domain.

Note: Entering * as the password means you will be prompted to enter it on the command prompt window in the next step. You can enter it in the initial command, if you wish to. Note: Note that the word "passwordd" has 2 d's in it…


2. When prompted to enter the password, type the password for the domain user account specified by UserName.

3. Restart the computer by typing the following at a command prompt:

shutdown /r /t 0

To remove the Windows 2008 server from a domain

1. At a command prompt, type:

netdom remove

2. Reboot the computer.

To configure automatic updates

1. To enable automatic updates, type:

cscript C:’Windows’System32’Scgredit.wsf /au 4

2. To disable automatic updates, type:

cscript C:’Windows’System32’Scgredit.wsf /au 1

BTW, in order to view your current settings you can type:

cscript C:’Windows’System32’Scgredit.wsf /au /v

To configure error reporting

1. To verify the current setting, type:

serverWerOptin /query

2. To automatically send detailed reports, type:

serverWerOptin /detailed

3. To automatically send summary reports, type:

serverWerOptin /summary

4. To disable error reporting, type:

serverWerOptin /disable

Summary

Windows Server 2008 Core machines need to be properly configured for communication across your network. While most of the Server Core settings need to be configured via the local Command Prompt, some settings can also be configured remotely. This article, a part of a complete Server Core article series, will show you how to do that. So, if you want to be more familiar with Windows Server 2008, you should try HostForLife.eu. Only with € 3.00/month, you can get a reasonable price with best service.

Top Reasons to host your ISS 7.5 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.

 



Silverlight 3 European Hosting :: Working with Data Services in Silverlight 3 - WCF vs REST

clock May 3, 2010 08:12 by author Scott

Here we'll delve into the latter Silverlight 3 feature by comparing the options developers have for communicating with services from Silverlight. We'll do so by building a sample application called Cooking with Silverlight, a fictitious site where people can search in a recipe database and read reviews of recipes. We'll start by showing options for exchanging information with a Windows Communication Foundation (WCF) service. After that, We'll build the same application, but now using representational state transfer (REST) services. These two examples will demonstrate the differences between communicating with WCF or REST in a Silverlight app. You can download the complete code for this article by clicking the above link.

Working with Data in a Silverlight App

Silverlight uses the same Base Class Library (BCL) as the full .NET Framework, however, only a subset is available in the Silverlight platform. When browsing the assemblies, you'll quickly notice that many familiar data-related assemblies and classes are missing. Indeed, Silverlight does not contain ADO.NET and has no support for a DataSet or DataReader. In Silverlight 3, the current version at the time of writing, Silverlight has no client-side database access available, and it isn't possible to have a connection string in your Silverlight application, which would allow remote database access.

However, enterprise applications are built around data. To solve this problem, Silverlight can connect with services, on the same server on which the Silverlight app is hosted or on another server, if it complies with a few characteristics, which we'll look at in the cross-domain section of this article. Using services, we can satisfy almost every requirement for working with data in a Silverlight application. Even if we had a client-side database implementation, we'd still have the services required to use up-to-date information.

Out of the box, Silverlight can connect with several types of services, including WCF and REST. Let's first look at how the sample application was built and compare where the two technologies differ from one another.

Silverlight and WCF

WCF is the preferred way of building services in the .NET Framework. Designing a WCF service for use with Silverlight isn't much different from designing the service for use with any other technology. The main difference is the type of binding used for the communication. By default, when you add a WCF service to a project, it's configured to use a wsHttpBinding. In general, a wsHttpBinding supports distributed transactions and secure sessions. Silverlight, however, can't work with this type of binding; instead a basicHttpBinding is required. A basicHttpBinding essentially allows communication with a traditional ASMX web service (based on WS-BasicProfile 1.1) and lacks the options offered by the wsHttpBinding, such as secure sessions.

This means that all data is transmitted as plain XML in a SOAP message. In enterprise environments, this could be risky. To counter this risk, one possible solution is using ASP.NET authentication to allow access only to authenticated users on the services. 

Visual Studio offers a Silverlight-enabled WCF service template. This template sets the correct type of binding in the configuration file.

Creating the WCF Service

A WCF service typically offers a service contract. The service contract offered by the service defines the operations exposed by the service. Each operation that needs to be exposed over the service is attributed with an OperationContractAttribute.

The implementation of the service, contained in the *.svc.cs file in a WCF scenario, contains the logic for accessing the data using the repository and returning a list of DTOs.

Using the WCF Service from the Silverlight Client

With the service in place, the Silverlight application needs to connect with it. WCF services are said to be self-describing: They expose a Web Services Description Language (WSDL) file, which contains metadata about the service. This metadata describes, among other things, the operations and data contracts exposed by the service. When you connect to such a service using Visual Studio's Add Service Reference dialog box, the IDE will generate a proxy class. This proxy contains a client-side copy of the service. The proxy class contains all operations, without the implementations, and a copy of the data contracts. Because of this, we get full IntelliSense in the editor when working with the service.

To execute a call to the service, we use this proxy class. However, when the application accesses a service from Silverlight, the call will be executed asynchronously. If synchronous calls were possible, during the call's execution the browser would remain blocked while awaiting a response from the server.

A callback method is specified for the XXX_Completed event. This method is executed when the service returns. Making the actual async call to the service is done using the XXXAsync method. Inside the callback method, the result of the service call is accessible through the e.Result property. This property's type is the same type as returned by the service. These types were generated when the proxy was created upon adding the service reference. We're using the result, here a generic List of Recipe instances, as the ItemsSource for the ListBox. Of course, other data-binding scenarios are possible here.

Silverlight and REST

The biggest advantage of using WCF services is the typed access, which is based on the metadata that the service exposes. This makes the process of writing the client-side code easier. However, not every service exposes metadata. Some services work with human-readable information, mostly in the form of XML, which they send following a request from the client.

This is the case for REST services. Compared with WCF, REST has some advantages. As said, the information is exchanged as pure XML (or JavaScript Object Notation—JSON, if needed). The XML is clean and more lightweight than the SOAP messages exchanged when using WCF. Thus, less data will go over the wire, resulting in faster transfer of the data. REST is also entirely platform independent: It requires no extra software as it relies on standard HTTP methods. However, because REST services are not self-describing, Visual Studio can't generate a proxy class. This means that when writing a Silverlight application that needs to work with a REST service, we manually need to parse the returned XML to capture the server's response. Luckily, Silverlight includes LINQ to XML, making this process much easier. Alternatively, you could use the XmlReader/XmlWriter or the XmlSerializer for this task.

Creating the REST Service

A REST service will send data when it's requested to do so. The request is done over HTTP, for example, by sending a request to a specific URL. The REST service will then respond by sending XML over the wire.

To create a REST service, we can use WCF as well. However, we need to perform some configuration changes to enable the WCF services to work as REST services.

The service operations in the service contract need to be attributed with WebGetAttribute in addition to the OperationContractAttribute. The UriTemplate defines what the URL should look like and which parameters it should contain to get access to the associated operation.

The implementation of the service operation is almost identical to the WCF implementation, as you can see in the previous listings. To test the service and see its response, navigate for example to http://localhost:1234/ RestRecipeService.svc/recipe/find/pancake.

For the sample application, we wrote the REST service ourselves. It's also possible to use one of the numerous, often free, REST service APIs available, such as Twitter, Flickr, or Facebook. Looking at those APIs, it's easy to see that their XML is also the contract for data exchange between a client application and the service.

Using the REST Service from the Silverlight Client

Since there's no metadata available on a REST service, we can't add a service reference to it from Visual Studio. We need another approach.

Using a REST service from Silverlight is a three-step process. Step one: Build the URL to which we need to send a request. The format of this URL is defined by the service and may contain parameters that we must provide as well. Step two: Send a request to that URL. And finally, step 3: Wait for the result to come in as XML or JSON and parse this accordingly.

Building the URL is pretty straightforward. It's constructed by gluing together the URL from the service project with the string defined as value for the UriTemplate. You can send a request to this URL by using either the WebClient or the HttpWebRequest class, both part of the System.Net namespace and also classes included in the full .NET Framework. For most situations, the WebClient will suffice; if you need more fine-grained control over the request, the HttpWebRequest is the best bet. The WebClient is basically a wrapper around the HttpWebRequest with an easier API: Using the WebClient under the covers still uses methods of the HttpWebRequest. We'll use the WebClient here as well.

Cross-Domain Access

When accessing services, Silverlight will not allow access of these services by default if they're hosted on a domain other than the domain hosting the Silverlight application. In other words, if we have a Silverlight application called CookingWithSilverlight.xap hosted on http://www.somedomain.com, the application can't access a service on http://www.someotherdomain.com unless that service specifically grants a right to access it from a client application hosted on another domain. This feature is called cross-domain restrictions and is basically a security measurement to prevent cross-domain attacks.

How can a service allow the access anyway? When a cross-domain service request is launched, Silverlight will check for a file called ClientAccessPolicy.xml at the root of the domain (it will also check for crossdomain.xml, which is the policy file that Adobe Flash checks for). If this file is present and allows the call to be made, Silverlight will access the service. If the file isn't present or we're accessing from a domain that isn't on the list of allowed domains, Silverlight will block the request, resulting in a security exception being thrown.

Cross-domain restrictions apply for both WCF and REST services. Accessing an image or a video on another domain doesn't trigger this check. In the sample application, both the WCF and REST services are hosted in a website different from the one hosting the Silverlight application. In both websites, at the root, a policy file can be found, allowing access from any domain.

Two Services Options for Silverlight Developers

Both WCF and REST have their strong points. WCF really benefits from the fact that it exposes metadata that can be used to generate a proxy class. During development, this results in IntelliSense picking up the types and operations of the services, which makes things much easier. Features like easy duplex communication and binary XML data exchange make WCF in Silverlight quite complete. All SOAP 1.1–enabled services, even if they're exposed from technology other than .NET, can be used from Silverlight in the same manner. In most enterprises, SOAP-enabled services are the standard.

However, we don't always have—or need—all the options made available by WCF. If the data being exchanged is pure text, we can use REST. It's simple, fast, and is based on the HTTP standard methods, requiring no special software. Many large Web 2.0 sites expose an API that uses REST. Working with this type of services does require some more manual work, in that we have to send the request, capture the results, and parse them into meaningful data.

Regardless of what type of service is used, the communication happens asynchronously. In the case of WCF, when the proxy class is generated, both the XXXAsync method and the XXX_Completed event are created. When using REST, the WebClient has a DownloadStringAsync and a DownloadStringCompleted event.

Top Reasons to host your Silverlight 3 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 MVC European Hosting :: What's New in ASP.NET MVC 2.0

clock May 3, 2010 07:35 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 ASP.NET MVC, if you want to be more familiar with ASP.NET MVC, you should try HostForLife.eu.

Introduction

Overall, ASP.NET is one of the most popular web application frameworks along with PHP, Java and others. However, the classic ASP.NET WebForms style of application development also has its limitations. For instance, cleanly separating the user interface from the application logic and database access can be a challenge in WebForms applications. Thus, Microsoft created ASP.NET MVC. MVC stands for Model View Controller.

The ASP.NET MVC technology has already been introduced earlier (see the Resources section at the end of this article), and thus this article focuses on the new and improved features planned for .NET Framework version 4.0 that should become available in Spring, 2010. Originally Microsoft announced Visual Studio 2010 would launch on March 22nd, 2010, but most recent announcements indicate delays. As far as version numbers are concerned, the next version of ASP.NET MVC will be assigned the version number 2.0. In this article, you will learn what's new and improved in the newest Release Candidate (RC) version of ASP.NET MVC 2. At the time of this writing (late December, 2009) the latest beta version of Visual Studio 2010 is Beta 2, and it doesn't yet come with the ASP.NET MVC 2 RC. The unfortunate thing is that if you are using Visual Studio 2010 Beta 2, you cannot yet test MVC 2 RC with that version (you can naturally continue to use the older Beta 2 version). Instead, you must test the MVC 2 RC on Visual Studio 2008 SP1.

Of course, the final versions of ASP.NET MVC 2 are planned to work with both Visual Studio 2008 and 2010, so the current is only an interim situation.

Exploring the New Features

ASP.NET MVC 2 is an evolutional update to the framework. The basic features of the original version 1.0 are intact, but new features make development easier and result in cleaner code. The following list summarizes the key new features:

1. Area support and multi-project routing
2. Improved syntax for handling posts (form submits) in controllers
3. HtmlHelper object improvements
4. Attribute support for field validation in models
5. Globalization of validation messages
6. Field templates with custom user controls, and more.

Let's walk through each of these in more detail, starting from the top. In MVC 1.0, each view page was thought of as being a separate unit, and served to the browser as a single unit, possibly combined with a master page. However, if you wanted to combine, say, two views into a single page, you either had to manually render one of the pages or create a user control (.ascx) from one of the views, and then use that control inside the main view page. Although user controls are a fine solution, they break out of the MVC pattern.

In MVC 2, you can utilize so-called areas to solve the problem. With area support, you can combine different view pages into a single, larger view similar to the way you can build master pages (.master) and designate parts of them to be filled with content at run-time. It is possible to combine areas into views both inside a single MVC web project ("intra-project areas"), or combine areas in different projects into views ("inter-project areas"), accessible through direct URLs in the same scope.project ("intra-project areas"), or combine areas in different projects into views ("inter-project areas"), accessible through direct URLs in the same scope.

The following paragraphs walk you through using areas inside a single project. If you wanted to combine multiple MVC web projects into a single larger application, you would need to manually edit the .csproj project files of each project part of the overall solution (the edits you need to do are documented in the .csproj XML comments), add proper project references from the child projects to the master project, and then register routes using the MapAreaRoute method of the Routes object in the Global.asax file. In this article, focus is on single-project area support.

To get started with the areas, right-click your project's main node in Solution Explorer, and select the Add/Area command from the popup menu. This will open a dialog box asking for the name of your new area. Unlike with controller names, you don't need to append the word "Area" to the name, but you can if you prefer. However, bear in mind that intra-project areas will be accessed using the default route of /areaname/controllername/action/id. Because of this, you might not want to suffix the word "Area". In this article however, the word "Area" is appended for clarity.

Once you have created your area, Visual Studio will add a new folder called "Areas" in your project. This folder will contain a sub-folder with the name of your area, and inside that you will see a familiar layout of folders for controllers, views and models. In fact, you would add controllers, views and models to this area folder just the same as you would add them to your "master" MVC project. All in all, an area is like a mini MVC application inside another. Note also the
AreaRegistration.cs code file. This file's definitions are referenced to from the Global.asax.cs file.

Areas can be used in multiple ways. Because they are directly accessible using the previously mentioned default route, you can utilize them like any other link inside your application. Or, if you had an area controller action that would return a snippet of HTML code to be used inside a larger HTML page (a normal view page), you could use the HtmlHelper.RenderAction as follows:

<% Html.RenderAction("NetworkStatus", "Application", new { Area = "StatusArea" }); %>

Notice how there's an anonymous object being used to specify which area you want to use. Because areas can be completely independent of the master project, you can easily create usable parts or building blocks from your MVC applications and then combine them into larger solutions.

Area support is a very welcome addition to the framework. Luckily to us developers, area support is by no means the only new feature in ASP.NET MVC 2, like the next sections show.

Handling posts and encoding

When you need to handle form posts in your MVC applications, you generally write a new, overloaded controller action method to process the submitted data, and store it for example in a database. Since you only want these methods to be called using the HTTP protocol POST verb, you add an attribute at the beginning of the method like this:

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult MyAction(MyObject data)
...

Although there's nothing wrong in the AcceptVerbs attribute, ASP.NET MVC 2 allows you to achieve the same thing with a shorter attribute declaration:

[HttpPost]
public ActionResult MyAction(MyObject data)
...

Even though this is a small improvement, it is very likely that all MVC developers give it a warm welcome. Another useful new improvement is the support for automatically encoded output tags in view pages. Strictly speaking, this is not a new ASP.NET MVC feature, but instead a feature in ASP.NET 4.0. Even so, this new tag type is especially useful in MVC applications.

To illustrate the new tag, consider the following very common need to encode output for HTML:

<%= Model.CustomerName %>

This is a very simple tag, and works well in many situations. However, if the customer name were to contain certain special characters, you would need to encode the output to avoid user interface mess-ups and cross-site scripting attacks. A straightforward MVC method would do the trick:

<%= Html.Encode(Model.CustomerName) %>

All these ways to encode output are not inconvenient, but a shorter syntax would be great. This is what the nifty new “code block” tag does:

<%= Model.CustomerName %>

Notice the colon (:) immediately after the opening tag. It is a new way to encode output. The old equal sign syntax (which itself is a shortcut for Response.Write) is not going away. You can continue to use the old way, but the colon-syntax encoding is there to make the view page syntax cleaner.

Note that at this writing, you cannot use ASP.NET MVC 2 RC within Visual Studio 2010 Beta 2. Thus, you cannot effectively use this combination to test these code block tags, but you can test them in regular ASP.NET 4.0 applications (or with the older MVC Beta 2).

Using lamda expressions with the HtmlHelper object

If you have used ASP.NET MVC 1.0, then you've most probably also created a model object and enabled editing of its details with HTML code similar to the following:

<%= Html.TextBox(“Name”, Model.Name) %>

Although this is fine for many purposes, the problem is that you still have to enter a string constant. Because it is a string, the compiler will not complain if you later change the property name in the model class, but forget to change the HTML tag. Also, the syntax is somewhat verbose (at least to some developers), and requires you to manually create one field per model object property.

In ASP.NET MVC 2, you can use the new TextBoxFor method. Just like the previous HtmlHelper methods like Label, ListBox, and so on, there are now multiple *For methods that all accept a lambda expression returning the correct object value.

Thus, to create a new editing control for the Name property, you could write code like this:

<%= Html.TextBoxFor(c => c.Name %>

Here, the lambda expression parameter "c" is replaced at runtime with the model object instance, and in addition to getting rid of the string value, you will get full IntelliSense support just like before with the model object.

ASP.NET MVC 2 also brings support for a convenient way to create editing forms for complex objects quickly. For instance, if you had a model object with three fields, you could either manually create labels and text boxes for each of the three fields, or use a new extension method called EditorForModel. This method will create form fields for each visible property in the model:

<%= Html.EditorForModel() %>

This method is really convenient, if you don't have special formatting requirements for your editing forms.

Top Reasons to host your ASP.NET MVC 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.

 



IIS 7.5 European Hosting :: Installing Hyper-V on Windows Server 2008 Server Core

clock May 1, 2010 07:03 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 Windows Server 2008, if you want to be more familiar with Windows Server 2008, you should try HostForLife.eu.

The Server Core installation option of the Windows Server 2008 operating system installs a minimal server installation of Windows Server 2008 to run supported server roles, including the Hyper-V role. When you select the Server Core installation type option, the Windows setup program installs only the files that are required for the supported server roles. For example, the Explorer shell is not installed as part of a Server Core installation. Instead, you must configure the server locally using the command line.

The benefits of using the Hyper-V on a Server Core installation include a reduced attack surface, reduced management, and reduced maintenance.

After you have enabled the Hyper-V role on Server Core, you can manage the Hyper-V role and virtual machines remotely using the Hyper-V management tools. The management tools are available for Windows Server 2008 and Windows Vista Service Pack 1 (SP1).

BIOS Settings

You must enter the BIOS setup of the server and make sure that “Virtualization Technology” and “Execute Disable” are both set to Enabled.  In most cases, the required BIOS settings can be found in these BIOS sections (actual names may differ, based upon your server's BIOS settings):

- Security > Execute Disable (set to On)
- Performance > Virtualization (set to On)
- Performance > VT for Direct I/O Access (set to On)
- Performance > Trusted Execution (set to Off)

Operating System Version and Architecture

In case you were not the person that has initially installed the server, you'd better make sure it supports Hyper-V and that is has the appropriate license to operate it, before starting to install the role. To find out what kind of Windows Server product is currently installed, you to run the following command:

wmic OS get OperatingSystemSKU

The number that is returned corresponds with Microsoft's list of SKU numbers for Windows Server. Please ensure that your version supports Hyper-V:

- 12 - Windows Server 2008 Datacenter Edition, Server Core
- 13 - Windows Server 2008 Standard Edition, Server Core
- 14 - Windows Server 2008 Enterprise Edition, Server Core

If any other number is returned, this means that you should not install Hyper-V on this server.

You should also check the architecture of the server installation as well:

wmic OS get OSArchitecture

The architecture should be 64-bit in order to be able to install Hyper-V.

Installation procedure

Below is the step-by-step on installing Hyper-V on Windows Server 2008 Server Core:

1. Complete the Server Core installation and initial configuration tasks. These include the following tasks:

- Setting the administrative password – Use the NET USER command.
- Configuring the server's computer name – Use the NETDOM command.
- Setting a static IP address on all relevant NICs – Use the NETSH command.
- Activating the server – Use the SLMGR.VBS command.
- Joining the server to a domain (if required) – Use the NETDOM command.
- Configure the firewall for remote administration – Use the NETSH command.
- Enable Remote Desktop for Administration if you want to manage the server running a Server Core installation remotely – Use the SCREGEDIT.WSF command.

2. After you have installed Windows Server 2008, you must apply the Hyper-V update packages for Windows Server 2008 (KB950050). See download links above.

Download the Hyper-V updates, copy them either to the Server Core local hard disk or to a network share and then type the following command at a command prompt:

wusa.exe Windows6.0-KB950050-x64.msu /quiet

To view the list of software updates and check if any are missing, at the command prompt, type:

wmic qfe list

After you install the updates, you must restart the server.

Important note: Before you enable the Hyper-V role, ensure that you have enabled the required hardware-assisted virtualization and hardware-enforced Data Execution Prevention (DEP) BIOS settings. Checks for these settings are performed before you enable the Hyper-V role on a full installation, but not on a Server Core installation. If you enable the Hyper-V role without modifying the BIOS settings, the Windows hypervisor may not work as expected.

3. To install the Hyper-V role, at a command prompt, type:

start /w ocsetup Microsoft-Hyper-V

4. Add a user or group to the local Administrators group so that they can manage the Server Core installation remotely. To add a user to the local Administrators group, you must first add the user. At a command prompt, type:

net user <username> * /add

To add a user to the local Administrators group, at a command prompt, type:

net localgroup administrators /add <user>

5. Restart the server to make the changes take effect. At a command prompt, type:

shutdown /r /t 0

6. Use a regular installation of Windows Server 2008 or Windows Vista SP1 to remotely connect to the Server Core machine and manage the Hyper-V role on it.

Top Reasons to host your ISS 7.5 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.

 



Full Trust European Hosting :: How to Grant Full Trust to Your ASP.NET web site on your VPS or Dedicated Server

clock May 1, 2010 06:39 by author Scott

In our last post, we discussed topics about Full Trust and Windows Azure. Now, we’ll discuss how to grant Full Trust to your ASP.NET website on your VPS/Dedicated Server. However, in this article, we describe only briefly about Full Trust European Hosting. If you want to be more familiar with Full Trust European Hosting, we recommend you to try HostForLife.eu Only with € 3.00/month, you can get a reasonable price with best service. C’mon, Try it!!

Here we go...

On your Virtual Private Server or Dedicated server browse to the configuration folder

Normally installation path will be - C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG

Open the web.config in notepad

Place following lines at the top of you config with the <configuration> directive replacing yourdomain.com with the name of the IIS web you wish to grant full trust to.

<location path=”yourdomain.com” allowOverride=”true”>
<system.web>
<trust level=”Full” originUrl=”" />
</system.web>
</location>

Now your web.config will look like -

<?xml version=”1.0 encoding=”utf-8?>
<!– the root web configuration file –>
<configuration>
<!–
Using a location directive with a missing path attribute
scopes the configuration to the entire machine.  If used in
conjunction with allowOverride=”false”, it can be used to
prevent configuration from being altered on the machine

Administrators that want to restrict permissions granted to
web applications should change the default Trust level and ensure
that overrides are not allowed
–>
<location allowOverride=”true”>
<system.web>
<securityPolicy>
<trustLevel path=”yourdomain.com” name=”Full” policyFile=”internal” />
</securityPolicy>
<trust level=”Full” originUrl=”" />
</system.web>
</location>
<system.net>
<defaultProxy>
<proxy usesystemdefault=”true” />
</defaultProxy>
</system.net>

Top Reasons to host your FullTrust 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.

 



IIS 7.5 European Hosting :: Installing Virtual Server VM Additions on Windows Server 2008 & Windows Vista

clock April 30, 2010 06:19 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 Windows Server 2008, if you want to be more familiar with Windows Server 2008, you should try HostForLife.eu.

Virtual Machine Additions are a very important component of Virtual Server 2005 (and Virtual PC 2007). Running VM Additions on a VM is not a must, but you'd better do it as soon as possible, even as the first thing to do right after finishing the installation phase of the OS itself.

Virtual Machine Additions adds the following enhancements to a guest operating system:

- Improved mouse cursor tracking and control
- Greatly improved overall performance
- Virtual machine heartbeat generator
- Optional time synchronization with the clock of the physical computer

You can use several methods to install the VM Additions:

- Through the Virtual Server administrative website
- Through VMRC Plus
- Unattended installation
- Through scripting

Additionally, if you've got Microsoft System Center Virtual Machine Manager (SCVMM) installed, you can also:

- Install the VM Additions from the VMM console
- Use PowerShell

Let's see how each method is carried on:

Using VMRC Plus to Install the VM Additions

If you've got VMRC Plus installed you can easily install VM Additions by performing these steps:

1. In the VMRC Plus console, point to the virtual machine you want to install the VM Additions on, and then double-click it to turn it on.

2. Once the virtual machine has started, point to the virtual machine name, and then double-click it to remote control it.

3. Log on to the virtual machine as an administrator or member of the Administrators group.

4. Once the guest operating system is loaded, in the Console Manager window click Media > Install Current VM Additions.

5. Inside the VM, follow the prompts and perform the installation.

6. You must reboot the guest virtual machine in order for the VM Additions to function properly.

Using the Virtual Server administrative website to Install the VM Additions

To install Virtual Machine Additions through the Virtual Server administrative website please follow these steps:

1. Open the Virtual Server Administration website.

2.
In the navigation pane, under Virtual Machines, point to Configure and then click the appropriate virtual machine.

3.
In Status, point to the virtual machine name, and then click Turn On.

4. Once the virtual machine has started, point to the virtual machine name, and then click Remote Control.

5.
Log on to the virtual machine as an administrator or member of the Administrators group.

6. Once the guest operating system is loaded, press the HOST KEY to release the mouse pointer, and then in the lower-left corner under Navigation, click Configure virtual_machine_name, where virtual_machine_name is the name of the VM you wish to install the VM Additions on.

7. In Configuration, click Virtual Machine Additions, click Install Virtual Machine Additions, and then click OK.

8. Under Status, point to the virtual machine name, and then click Remote Control.

9. Click in the Remote Control window to return to the guest operating system. The Virtual Machine Additions installation wizard will start. Proceed through the wizard.

10. Once the wizard is complete, you will be prompted to restart the virtual machine to complete the installation.

Using Unattended Installation to Install the VM Additions

To perform an unattended installation, place the Virtual Machine Additions image file (.ISO) to a location where it can be accessed by the virtual machines. Logon to the VM and in a command prompt window from within the VM type the following command:

setup.exe –s –v”/qn [Reboot=ReallySurpress]”

Using the SCVMM Administrator Console to Install the VM Additions

First, it is recommended that you add the Virtual Machine Additions to your VMM Library. This will allow you to use the same ISO image for all of your virtual machines.

To add Virtual Machine Additions to your VMM Library:

1. Copy the VMAdditions.iso file to a share in the Virtual Machine Manager library and then refresh the library server. The default location is C:'Program Files'Microsoft Virtual Server'Virtual Machine Additions.

2. If you do not see the VMAdditions ISO file in Library view or when you browse for a known image file, disable any filters and manually refresh the library.

To install Virtual Machine Additions on an existing virtual machine:

1. In Virtual Machines view, right-click the virtual machine on which you want to install Virtual Machine Additions, and then click Properties

2. In the Virtual Machine Properties dialog box, display the Hardware Configuration tab.

3.
If there is no DVD drive, add a DVD drive to the IDE device by clicking DVD on the New menu bar to add one.

4. Click Known image file, click Browse to open the Select ISO dialog box, click the VMAdditions.iso file, and then click OK.

5. Start the virtual machine. Virtual Machine Additions will install from within the running virtual machine.

Using SCVMM and PowerShell to Install the VM Additions

Here is a PowerShell script you can run on the VMM server that will do that. It assumes that you have an ISO called VMAdditions.iso in a library share managed by VMM. The VM Additions are installed with Virtual Server 2005 R2 SP1 in the <yourinstalldrive>'Program Files'Microsoft Virtual Server'Virtual Machine Additions folder. So you first either copy this ISO to the library for use on all VMs, or modify the script to use the copy local to the host your VM is on.

Copy the following text and save it as Install-VMAdditions.ps1:


 # Install-VMAdditions.ps1
Svm = $args[0]
if (Svm.Status –eq ‘Running’ )
{
$vmadditions = get-iso | where { $_.Name –eq ‘VMAdditions’ }
Set-VirtualDVDDrive –VirtualDVDDrive $vm.VirtualDVDDrives[0] –Link –ISO
$vmadditions
}
else
{
write-host “The VM must be Running before you can install VM Additions.”
}

To use this script:

$vm = get-vm –Name “My VM”
C: ‘Scripts’Install-VMAdditions.ps1 $vm

The VM Additions installer will launch automatically inside the guest OS.

Notes:

- The VM does not need to be running order to attach an ISO to a Virtual DVD drive, but the VM does need to be running in order to install VM Additions.

- On the Set-VirtualDVDDrive lines, the –Link¬ parameter means: Point to the ISO inside the library instead of copying it to the host.

Reinstalling Virtual Machine Additions for use with Virtual PC

If you move a virtual machine that was created with Microsoft Virtual PC to Virtual Server, we recommend that you reinstall Virtual Machine Additions, even if it was installed in Virtual PC. This is because the version of Virtual Machine Additions included with Virtual Server has been updated.

Current VM Addition versions are:

- VM Additions in VS 2005 R2 SP1 = 13.813
- VM Additions in VPC 2007= 13.803


Top Reasons to host your ISS 7.5 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.

 



IIS 7.5 European Hosting :: Installing Active Directory on Windows Server 2008

clock April 29, 2010 06:55 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 Windows Server 2008, if you want to be more familiar with Windows Server 2008, you should try HostForLife.eu.

Considerations when Installing a new Windows Server 2008 domain in an existing Windows 2000/2003 forest

When you install AD to create the first domain controller in a new Windows Server 2008 domain, you must keep the following considerations in mind:

- Before you create a new Windows Server 2008 domain in a Windows 2000/2003 forest, you must prepare the forest for Windows Server 2008 by extending the schema (that is, by running ADPREP /forestprep).

- You must make domain functional level decisions that determine whether your domain can contain domain controllers that run Windows 2000 Server, Windows Server 2003, or both. To read more about forest and domain functional levels please refer to the links below.

- We recommend that you host the PDC emulator operations master role in the forest root domain on a domain controller that runs Windows Server 2008.

Installing Active Directory Domain Services (AD-DS)

In Windows Server 2008, unlike previous server operating Systems, there is an additional step that needs to be taken before running DCPROMO to promote the server to Domain Controller and installing Active Directory on it. This step is the installation of Active Directory Domain Services (AD-DS) role on the server. In fact, the AD-DS role is what enables the server to act as a Domain Controller, but you will still need to run DCPROMO the regular way.

AD-DS can be installed in one of 3 methods:

Method 1 – Server Manager/Initial Configuration Tasks

Roles can and should be added from Server Manager (but they can also be initiated from the Initial Configuration Tasks wizard that auto-opens the first time you log on to the server).

1. Open Server Manager by clicking the icon in the Quick Launch toolbar, or from the Administrative Tools folder.

2. Wait till it finishes loading, then click on Roles > Add Roles link.

3. In the Before you begin window, click Next.

4. In the Select Server Roles window, click to select Active Directory Domain Services, and then click Next.

5. In the Active Directory Domain Services window read the provided information if you want to, and then click Next.

6. In the Confirm Installation Selections, read the provided information if you want to, and then click Next.

7. Wait till the process completes.

8. When it ends, click Close.

9. Going back to Server Manager, click on the Active Directory Domain Services link, and note that there's no information linked to it, because the DCPROMO command has not been run yet.

10. Now you can click on the DCPROMO link, or read on.

Method 2 – Servermanagercmd.exe

Servermanagercmd.exe is the command prompt equivalent of the Add Roles and Add Features wizards in Server Manager. Through the use of various command line options, you can quickly and easily add or remove features and roles to or from your server, including the AD-DS role.

To install AD-DS by using Servermanagercmd.exe, simply enter the following command in the Command Prompt window:

Servermanagercmd.exe –I ADDS-Domain-Controller

Let the command run and when it finishes, AD-DS will be installed on the server.

Method 3 – Letting DCPROMO do the job

Oh yes. If you forget to install AD-DS or simply want to skip clicking on some windows, you can run DCPROMO from the Run command and before it is executed, the server will check to see if the AD-DS binaries are installed. Since they are not, they will auto-install.

After you complete the Add Roles Wizard, either click the link to start the Active Directory Domain Services Installation Wizard, or close Server Manager and manually run DCPROMO from the Run command.

Running DCPROMO

After installing the AD-DS role, we need to run DCPROMO to perform the actual Active Directory database and function installation.

1. To run DCPROMO, enter the command in the Run command, or click on the DCPROMO link from Server Manager > Roles > Active Directory Domain Services.

2. Depending upon the question if AD-DS was previously installed or not, the Active Directory Domain Services Installation Wizard will appear immediately or after a short while. Click Next.

3. In the Operating System Compatibility window, read the provided information and click Next.

4. In the Choosing Deployment Configuration window, click on "Create a new domain in a new forest" and click Next.

5. Enter an appropriate name for the new domain. Make sure you pick the right domain name, as renaming domains is a task you will not wish to perform on a daily basis. Click Next.

6. Pick the right forest function level. Windows 2000 mode is the default, and it allows the addition of Windows 2000, Windows Server 2003 and Windows Server 2008 Domain Controllers to the forest you're creating.

7. Pick the right domain function level. Windows 2000 Native mode is the default, and it allows the addition of Windows 2000, Windows Server 2003 and Windows Server 2008 Domain Controllers to the domain you're creating.

8. The wizard will perform checks to see if DNS is properly configured on the local network. In this case, no DNS server has been configured, therefore, the wizard will offer to automatically install DNS on this server.

9. It's most likely that you'll get a warning telling you that the server has one or more dynamic IP Addresses. Running IPCONFIG /all will show that this is not the case, because as you can clearly see, I have given the server a static IP Address. So, where did this come from? The answer is IPv6. I did not manually configure the IPv6 Address, hence the warning. In a network where IPv6 is not used, you can safely ignore this warning.

10. You'll probably get a warning about DNS delegation. Since no DNS has been configured yet, you can ignore the message and click Yes.

11. Next, change the paths for the AD database, log files and SYSVOL folder. For large deployments, carefully plan your DC configuration to get the maximum performance. When satisfied, click Next.

12. Enter the password for the Active Directory Recovery Mode. This password must be kept confidential, and because it stays constant while regular domain user passwords expire (based upon the password policy configured for the domain, the default is 42 days), it does not. This password should be complex and at least 7 characters long. We strongly suggest that you do NOT use the regular administrator's password, and that you write it down and securely store it. Click Next.

13. In the Summary window review your selections, and if required, save them to an unattend answer file. When satisfied, click Next.

14. The wizard will begin creating the Active Directory domain, and when finished, you will need to press Finish and reboot your computer.

Note: You can automate the rebooting process by checking the Reboot on Completion checkbox.

Top Reasons to host your ISS 7.5 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