European Windows 2012 Hosting BLOG

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

ASP Net MVC European Hosting :: ASP.NET MVC Request Validation

clock May 12, 2010 07:47 by author Scott

This topic contains information about key features and improvements in the .NET MVC . This topic does not provide comprehensive information about all new features and is subject to change. In case you are looking for ASP.NET MVC Hosting, you can always consider HostForLife.eu and you can start from our lowest Standard Plan € 3.00/month to host your ASP.NET MVC site.

When using ASP.NET MVC to post data that might contain HTML or other potentially dangerous data, the default behavior as of the Release Candidate is to throw an exception, preventing the posting of the data.  This is a well-known feature of ASP.NET that was introduced several versions ago, and the typical way to avoid it (when necessary for the applications function) is to add validateRequest=false either to the @Page attribute or to the <pages /> section in web.config.  Notably, this doesnt actually work with ASP.NET MVC RC (and v1.0 I presume).

The reason for this is because of the way ASP.NET MVC processes requests.  In traditional web forms, the page itself is responsible for handling the request, but in MVC the controller has this responsibility.  The ASPX page in MVC is simply the view, and in fact a particular request might not even render a view, completely bypassing the Request Validation features of the Page.

Instead, request validation has been moved to the controller, which is where any logic for writing possibly dangerous data to the database would reside.  If it is necessary to bypass Request Validation in an ASP.NET MVC application, then the way to achieve it is with an attribute on the controller or action involved.

We were trying to add a post with an <img /> tag in it to test out one of the features of the blog.  Unfortunately, we initially got a request validation exception when we tried to post the content, and after adding validateRequest=false to the <pages /> section in web.config, the error persisted.  A little bit of research revealed the need to update the controller associated with the post (not the one used to render the Add view) with the ValidateInput(false) attribute, like so:

[ValidateInput(false)]
public ActionResult Create([Bind(Prefix=””)] Models.BlogEntry entry)
{

}

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.

 



ASP Net MVC European Hosting :: 6 Tips for ASP.NET MVC Model Binding

clock May 10, 2010 09:35 by author Scott

This topic contains information about key features and improvements in the .NET MVC . This topic does not provide comprehensive information about all new features and is subject to change. In case you are looking for ASP.NET MVC Hosting, you can always consider HostForLife.eu and you can start from our lowest Standard Plan € 3.00/month to host your ASP.NET MVC site.

Model binding in the ASP.NET MVC framework is simple. Your action methods need data, and the incoming HTTP request carries the data you need. The catch is that the data is embedded into POST-ed form values, and possibly the URL itself. Enter the DefaultModelBinder, which can magically convert form values and route data into objects. Model binders allow your controller code to remain cleanly separated from the dirtiness of interrogating the request and its associated environment.

Tip 1 : Prefer Binding Over Request.Form

If you are writing your actions like this ..

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create()
{
    Recipe recipe = new Recipe();
    recipe.Name = Request.Form[“Name”];

    // ...

    return View();
}

.. then you are doing it all wrong. The model binder can save you from using the Request and HttpContext properties – those properties make the action harder to read and harder to test. One step up would be to use a FormCollection parameter instead:

public ActionResult Create(FormCollection values)
{
    Recipe recipe = new Recipe();
    recipe.Name = values[“Name”];

    // ...

    return View();
}

With the FormCollection you don’t have to dig into the Request object, and sometimes you need this low level of control. But, if all of your data is in Request.Form, route data, or the URL query string, then you can let model binding work its magic:

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create(Recipe newRecipe)
{
    // ...

    return View();
}

In this example, the model binder will create your newRecipe object and populate it with data it finds in the request (by matching up data with the recipe’s property names). It’s pure auto-magic. There are many ways to customize the binding process with “white lists”, “black lists”, prefixes, and marker interfaces. For more control over when the binding takes place you can use the  UpdateModel and TryUpdateModel methods.

Tip 2 : Custom model binders

Model binding is also one of the extensibility points in the MVC framework. If you can’t use the default binding behavior you can provide your own model binders, and mix and match binders. To implement a custom model binder you need to implement the IModelBinder interface. There is only method involved - how hard can it be?

public interface IModelBinder
{
    object BindModel(Controller Context controllerContext,
                     ModelBindingContext bindingContext);
}

Once you get neck deep into model binding, however, you’ll discover that the simple IModelBinder interface doesn’t fully describe all the implicit contracts and side-effects inside the framework.  If you take a step back and look at the bigger picture you’ll see that model binding is but one move in a carefully orchestrated dance between the model binder, the ModelState, and the HtmlHelpers. You can pick up on some of these implicit behaviors by reading the unit tests for the default model binder.

If the default model binder has problems putting data into your object, it will place the error messages and the erroneous data value into ModelState. You can check ModelState.IsValid to see if binding problems are present, and use ModelState.AddModelError to inject your own error messages.

Both the controller action and the view can look in ModelState to see if there was a binding problem. The controller would need to check ModelState for errors before saving stuff into the database, while the view can check ModelState for errors to give the user validation feedback. One important note is that the HtmlHelpers you use in a view will require ModelState to hold both a value (via ModelState.SetModelValue) and the error (via AddModelError) or you’ll have runtime errors (null reference exceptions). The following code can demonstrate the problem:

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create(FormCollection Form0
{
    // this is the wrong approach ...
    if (Form[“Name”].Trim().Length == 0)
        ModelState.AddModelError(“Name”, “Name is required”);

    return view();
}

The above code creates a model error without ever setting a model value. It has other problems, too, but it will create exceptions if you render the following view.

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

Even though you’ve specified Model.Name as the value for the textbox, the textbox helper will see the model error and attempt to display the “attempted value” that the user tried to put in the model. If you didn’t set the model value in model state you’ll see a null reference exception.

Tip 3 : Custom Mode Binding via Inheritance

If you’ve decided to implement a custom model binder, you might be able to cut down on the amount of work required by inheriting from DefaultModelBinder and adding some custom logic. In fact, this should be your default plan until you are certain you can’t subclass the default binder to achieve the functionality you need. For example, suppose you just want to have some control over the creation of your model object. The DefaultModelBinder will create object’s using Activator.CreateInstance and the model’s default constructor. If you don’t have a default constructor for your model, you can subclass the DefaultModelBinder and override the CreateModel method.

Tip 4 : Using Data Annotations for Validation

.NET 3.5 SP1 shipped a System.ComponentModel.DataAnnotations assembly that looks to play a central role as we move forward with the .NET framework. By using data annotations and the DataAnnotationsModelBinder, you can take care of most of your server-side validation by simply decorating your model with attributes.

public class Recipe
{
    [Required(ErorrMessage=”We need a name for this dish.”)]
    [Regular Expression(“^Bacon”)]
    public string Name { get; set; }

    // ...
}

The DataAnnotationsModelBinder is also a great sample to read and understand how to effectively subclass the default model binder.

Tip 5 : Recognize Binding and Validation As Two Phases

Binding is about taking data from the environment and shoving it into the model, while validation is checking the model to make sure it meets our expectations. These are different different operations, but model binding tends to blur the distinction. If you want to perform validation and binding together in a model binder, you can – it’s exactly what the DataAnnotationsModelBinder will do. However, one thing that is often overlooked is how the DefaultModelBinder itself separates the binding and validation phases. If all you need is simple property validation, then all you need to do is override the OnPropertyValidating method of the DefaultModelBinder.

Tip 6 : Binders Are About The Environment

Earlier we said that “model binders allow your controller code to remain cleanly separated from the dirtiness of interrogating the request and its associated environment”. Generally, when we think of binder we think of moving data from the routing data and posted form values into the model. However, there is no restriction of where you find data for your model. The context of a web request is rich with information about the client.

Conclusion

Model binding is beautiful magic, so take advantage of the built-in magic when you can. We think the topic of model binding could use it’s own dedicated web site. It would be a very boring web site with lots of boring code, but model binding has many subtleties. For instance, we never even got to the topic of culture in this post.

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.

 



Full Trust European Hosting :: Why Full Trust hosting is not recommended when using a shared ASP.NET or shared Windows hosting plan?

clock May 9, 2010 08:17 by author Scott

This time, we’ll explore a bit about Full Trust. To find complete information, we recommend you to try HostForLife.eu. Only with € 3.00/month, you can get a reasonable price with best service.

The default trust level for ASP.NET web applications is Full, which grants unrestricted permissions. This is a dangerous trust level when working in a shared environment because it allows one web application to interact with the file system of other web applications on the same server.

For example, if you are in a shared environment that physically arranges its shared web applications in a common folder (i.e., C:\Inetpub\wwwroot\WebApp1, C:\Inetpub\wwwroot\WebApp2, …, C:\Inetpub\wwwroot\WebApp3, and so on), one web application could use the following code to display the Web.config contents of all of the other web applications on the server:

For Each folder As DirectoryInfo In parentPathInfo.GetDirectories()
Dim fileOfInterest As String = Path.Combine(folder.FullName, "Web.config")
If File.Exists(fileOfInterest) Then
Dim webConfigReader As StreamReader = File.OpenText(fileOfInterest)
Response.Write(String.Format("<p><b>Data for File {0}:</b></p><p>{1}</p><hr />", fileOfInterest, _                                                 Server.HtmlEncode(webConfigReader.ReadToEnd())))
webConfigReader.Close()
End If
Next

Since connection strings are usually placed in Web.config, the user running the above code would now be able to connect to other customers databases, where there might be sensitive customer information. The point is, if an ASP.NET application is running in full trust, there’s nothing to stop them from reading, creating, modifying, or deleting files in your web application’s file system.

Looking for good Full Trust Windows / ASP.NET Hosting Plans - Try HostForLife.eu.


Fortunately, most web hosting companies follow the advice in Microsoft’s ASP.NET 2.0 Hosting Deployment Guide and place their shared web applications in medium trust. This is accomplished by modifying the machine-level
Web.config file in the %windir%\Microsoft.NET\Framework\{version}\CONFIG folder. Moreover, this setting can be locked by the web hosting company.

Here are the permissions granted by the medium trust level:

Medium
Permissions are limited to what the application can access within the directory structure of the application.
No file access is permitted outside of the application’s virtual directory hierarchy.
Can access SQL Server
Can send email by using SMTP servers
Limited rights to certain common environment variables
No reflection permissions whatsoever
No sockets permission
To access Web resources, you must explicitly add endpoint ‘URLs’ - either in the originUrl attribute of the element or inside the policy file.

The following exceptions have been granted in addition to the ones listed above:
ODBC
OLEDB
Reflection Permissions
Web Permission

The main differences between ASP.NET 1.1 and ASP.NET 2.0 for the trust levels are the following:
In version 2.0, SQL Server access is available at Medium trust level because the SQL Server .NET Data Provider no longer demands full trust. In version 2.0, SMTP Permission is available at Full, High and Medium trust levels. This allows applications to send email.

To protect shared environment, you can also set the CAS (code access security) Level to Custom (some hosting companies do provide these settings). The custom setting is basically medium level with some exceptions including ODBC, OLEDB, sockets, Reflection Permissions and Web Permissions. Hosting company can set these custom permissions and can add more privileges. This setting cannot be overridden though, which is good.

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.

 



Silverlight 4 European Hosting :: How to Use SQL Reporting Services in Silverlight

clock May 6, 2010 08:39 by author Scott

It is important that you understand what the Reporting Services in SQL are all about. Then, you will be able to create a program that can call the SQL Server Reporting Services in Silverlight. With this article, we want to challenge you to try HostForLife.eu. Only with € 3.00/month, you can get a reasonable price with best service. For us, your satisfaction is our pleasure.

You may wonder how you can use the SQL Server Reporting Service in Silverlight. You may probably also want to know what the best practices are for the said process. What are the answers to these questions? Here is the truth: you should know that you cannot use Silverlight when you want to access the SQL server directly. This is because this does not have the ability to do so. You should remember that all the calls will go back to the server through the use of Web Service socket or call.

If you need to utilize the Reporting Service, you will have to create a code for Web Service, which you will use to call it. Once finished, Silverlight will display the result. This is how it works here. Therefore, you can still call the Reporting Service using the Service code just like the other server application like the ASP.Net application.

The SQL Server Reporting Services is something that allows the user to design and organize the reports that you need. This is a tool that you can employ which is suitable for distributing online or through print. You can easily get the results promptly and without delay. Since it is not possible that you can use the SQL Server Reporting Services in Silverlight directly, you can use other programs here. There are actually a few products which allow you to use the Silverlight application for the Reporting Services.

In actuality, the chief obstacle of Silverlight being a development platform for businesses is that it lacks components that can be used in order for a businessman or a company to work with reports. In this case, it will be difficult for the organization to function effectively without the use of the right reporting system. Meanwhile, with the correct software that will allow you to accomplish the job of using the SQL Server Reporting Services in Silverlight, you can leverage the advantages of the two so that you can efficiently have your companys own business intelligence application.

Usually, businessmen make use of the Silverlight Viewer for Reporting Services. This is a product that was first launched before the other applications that allows you to combine the Reporting Services and Silverlight. This program allows you to view the reports in Reporting Services with the utilization of Silverlight applications. This represents a control for Silverlight which is easily incorporated in any of the applications in Silverlight. In this case, it is possible for you to exploit the different sets of features which are available in standard desktop applications. These include dynamic scaling, smooth panning along with animation, sorting interactively, searching and many more.

You can use the Silverlight Viewer on applications that are situated on your html pages as well as with the applications that are out of your browser. There are many reasons as to why you may want to use this program. The first is that it allows you to print the reports right from Reporting Services using Silverlight. Second, this also has several features that you can use without much difficulty.

Top Reasons to host your Silverlight 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 :: Active Directory on Windows Server 2008 Requirements

clock May 6, 2010 08:29 by author Scott

The process of installing an Active Directory domain in Windows Server 2008 is quite simple, but some beginners or IT professionals that have never had a chance to get their hands on AD installations and that are not familiar with its requirements might stumble across a few pitfalls.

For easier, let us help you to host your IIS 7.5 site. Only with € 3.00/month, you can get the reasonable price with best service. So, contact us in HostForLife.eu.
This topic contains only brief information about Windows Server 2008.

An NTFS Partition

To successfully install AD you must have at least one NTFS formatted partition. Back in older operating systems this was something that you actually had to tell people about, because *some* administrators had servers that did not have their partitions formatted with NTFS. Nowadays, NTFS is the only way to go in Windows-based servers, but I will nevertheless put it on the writing, just to make sure.

This partition is where the SYSVOL folder is placed, and usually, that is the C:' partition, but for large AD deployments, this could very well be a different partition.

To convert a partition (C:) to NTFS type the following command in the command prompt window:

convert c:/fs:ntfs

Free Space on Your Disk

You need at least 250mb of free space on the partition you plan to install AD on. Of course you'll need more than that if you plan to create more users, groups and various AD objects.

Local Administrator’s username and password

Remember, only a local Administrator (or equivalent) can install the first domain and thus create the new forest. Other installation scenarios – such as adding additional (replica) DCs require either Domain Admin permissions, or, in case of new domains in the same tree or in new trees – Enterprise Admins permissions.

IP Configuration

While it is possible to install Active Directory on a server that has a dynamically-assigned IP address, it doesn't make much sense to do so. It's much better to configure the server with a manual and dedicated IP address. If you do not use a dedicated IP address, DNS registrations may not work and Active Directory functionality may be lost. If the computer is a multi-homed computer, the network adapter that is not connected to the Internet can host the dedicated IP address.

The Active Directory domain controller should point to its own IP address in the DNS server list to prevent possible DNS connectivity issues.

To configure your IP configuration, use the following steps:

Note: IP addresses can be also configured from the Command Prompt by using the NETSH command, but I will not describe that procedure here.

1. Right-click Network, and then click Properties.
If you do not have the Network icon visible on your desktop, use Control Panel.

2. In the Control Panel'Network and Sharing Center window, click on the manage Network Connections link on the left.
Note: You can get to the same window by typing NCPA.cpl in the run command.

3. In the Control Panel'Network Connections window, right-click Local Area Connection, and then click Properties.

4. Click Internet Protocol version 4 (TCP/IPv4), and then click Properties.
Note: You can also configure the TCP/IPv6 properties, but you do NOT have to, and frankly, unless you require TCP/IPv6 functionality, I'd simply ignore it or disable it. More on that, in a future article.

5. Make sure you have a static and dedicated IP address. If you don't need Internet connectivity through this specific NIC you can use a Private IP range such as 192.168.101.0 with a Subnet Mask of 255.255.255.0.

6. The next step is not required, but I usually recommend checking that the correct configuration is in place. Click Advanced, and then click the DNS tab. The DNS information should be configured as follows:

Configure the DNS server addresses to point to the DNS server. This should be the computer's own IP address if it is the first server or if you are not going to configure a dedicated DNS server.

- If the Append these DNS suffixes (in order) option is selected for the resolution of unqualified names, the Active Directory DNS domain name should be listed first, at the top of the list.
- Verify that the information in the DNS Suffix for this connection box is the same as the Active Directory domain name.
- Make sure that the Register this connection's addresses in DNS check box is selected.

Active Network Connection Required During Installation

The installation of Active Directory requires an active network connection. When you attempt to use DCPROMO.exe to promote a Windows Server 2008 computer to a domain controller that doesn't have a connected and active NIC, you will receive the following error message:

The wizard has detected that none of the network adapters for this computer is assigned a valid IP address.

Verify that the network cable is connected and that a DCHP server is available or the computer is configured to use a static IP address, then click Next.


And after hitting Next, this error will appear:

Active Directory Domain Services Installation Wizard The TCP/IP networking protocol must be properly configured. Complete the configuration before you proceed.

To resolve this problem, plug the network cable into a hub or other network device. While highly improbable that the network connection status would be disconnected in a server that is about to be deployed in a production environment, this could be the case when building the server for testing purposes. If network connectivity is not available and this is the first domain controller in a new forest, you can finish DCPROMO.exe by installing Microsoft Loopback Adapter.

DNS Configuration

A DNS server that supports Active Directory DNS entries (SRV records) must be present for Active Directory to function properly. In my Windows 2000/2003 versions of the Active Directory installation tips I recommended to manually install and configure DNS prior to running DCPROMO. However, in Windows Server 2008, and when installing the FIRST Domain Controller in the Active Directory domain, I tend to recommend that you allow the DCPROMO wizard to automatically build the proper DNS services and configuration.

Clients Connections

When considering Internet connectivity, it is recommended (and in most cases, this is the proper and most-used configuration) that the client computers connect to the Internet through a NAT device (i.e. a Router that translates private IP addresses to one public one, and allows connectivity through one ISP-assigned IP address). This prevents any issues that may arise if clients obtain an IP address from your Internet service provider (ISP). In Small Office or Home Office (SOHO) scenarios, this can be achieved by using a second network adapter on the server connected to a hub. You can use NAT and Routing on the server to isolate the clients on the local network. The clients should point to the domain's INTERNAL DNS server, and NOT to the ISP's DNS server, to ensure proper DNS connectivity. The internal DNS server's forwarder will then allow the clients to access DNS addresses on the Internet.


Do not use Single-Label Domain Names

As a general rule, Microsoft recommends that you register DNS domain names for internal and external namespaces with Internet authorities. This is true for Windows 2000/2003 and for Windows Server 2008. This includes the DNS names of Active Directory domains, unless such names are sub-domains of names that are registered by your organization name, for example, "corp.example.com" is a sub-domain of "example.com". When you register DNS names with Internet authorities, it prevents possible name collisions should registration for the same DNS domain be requested by another organization, or if your organization merges, acquires or is acquired by another organization that uses the same DNS names.

DNS names that don't include a period ("dot", ".") are said to be single-label (for example, com, net, org, bank, companyname) and cannot be registered on the Internet with most Internet authorities.

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 3

clock May 5, 2010 06:05 by author Scott

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

Workflow Extension

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

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

Persistence

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

Tracking

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

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

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

Creating Custom Activities

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

Activity class hierarcy

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

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


Composing activities using Activity designer

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

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

Writing custom activity class

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


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

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

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

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

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

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

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

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

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

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

 



ASP Net MVC European Hosting :: 12 ASP.NET MVC Best Practices

clock May 5, 2010 05:40 by author Scott

Controller’s best practices

1. Delete the account controller
You will never use it and it’s a super-bad practice to keep demo code in your applications.

2. Isolate controller from the outside World
Dependencies on the HttpContext, on data access classes, configuration, logging, clock, etc… make the application difficult (if not impossible) to test, to evolve and modify.

3. Use an IoC Container
To make it easy to adhere to Best Practice #2, use an IoC Container to manage all that external dependencies.

4. Say NO to “magic strings”
Never use
ViewData[“key”], but always create a ViewModel per each View, and use strongly-typed views ViewPage<ViewModel>.

Magic strings are evil because they will never tell you whether your view is failing due to a misspelling error, while using a strongly-typed model you will get a compile-time error when there is a problem. And as bonus you get Intellisense.

5. Build your own “personal conventions”
Use ASP.NET MVC as a base for your (or your company’s) reference architecture. Enforce your own conventions having controllers and maybe views inherit from your own base classes rather then the default ones.

6. Pay attention to the verbs
Even without going REST (just RESTful) use the best Http Verb for each action.

Model’s best practices

7. DomainModel ! = View Model
The DomainModel represents the domain, while the ViewModel is designed around the needs of the View, and these two worlds might be (and usually are) different. Furthermore the DomainModel is data plus behaviours, is hierarchical and is made of complex types, while the ViewModel is just a DTO, flat, and made of strings.

8. Use ActionFilters for “shared” data
This is our solution for the componentization story of ASP.NET MVC, and might need a future post of its own. You don’t want your controllers to retrieve data that is shared among different views. My approach is to use the Action Filters to retrieve the data that needs to be shared across many views, and use partial view to display them.

View’s Best Practices

9. Do NEVER user code-behind

10. Write HTML each time you can
We have the option that web developers have to be comfortable writing HTML (and CSS and JavaScript). So they should never use the HtmlHelpers whose only reason of living is hiding the HTML away (like
Html.Submit or Html.Button). Again, this is something that might become a future post.

11. If there is an if, write an HtmlHelper
Views must be dumb (and Controllers skinny and Models fat). If you find yourself writing an “if”, then consider writing an HtmlHelper to hide the conditional statement.

12.Choose your view engine carefully
The default view engine is the WebFormViewEngine, but IMHO it’s NOT the best one. We prefer to use the Spark ViewEngine, since it seems to me like it’s more suited for an MVC view. What we like about it is that the HTML “dominates the flow and that code should fit seamlessly” and the foreach loops and if statements are defined with “HTML attributes”.

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.

 



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.

 



About HostForLIFE.eu

HostForLIFE.eu 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 2016 Hosting, ASP.NET Core 2.2.1 Hosting, ASP.NET MVC 6 Hosting and SQL 2017 Hosting.


Tag cloud

Sign in