European ASP.NET 4.5 Hosting BLOG

BLOG about ASP.NET 4, ASP.NET 4.5 Hosting and Its Technology - Dedicated to European Windows Hosting Customer

HostForLife.eu Proudly Launches Premier European SQL 2008 R2 Hosting

clock May 24, 2011 06:21 by author Scott

HostForLIFE.eu was established to cater to an under served market in the hosting industry; web hosting for customers who want excellent service. HostForLIFE.eu – a cheap, constant uptime, excellent customer service, quality, and also reliable hosting provider in advanced Windows and ASP.NET technology. We proudly announces the availability of the SQL 2008 R2 hosting in our entire servers environment. HostForlife customers have a choice between SQL Server 2008 and SQL 2008 R2 when creating a database from inside the HostForLife hosting control panel.

SQL Server 2008 R2 delivers several breakthrough capabilities that will enable your organization to scale database operations with confidence, improve IT and developer efficiency, and enable highly scalable and well managed Business Intelligence on a self-service basis for your users. For more information on SQL Server 2008 R2, visit the Microsoft website, http://www.microsoft.com/sqlserver/en/us/default.aspx.

Some of the capabilities that customers and partners will benefit from include:

1. PowerPivot: a managed self-service analysis solution that empowers end users to access, analyze and share data across the enterprise in an IT managed environment using Excel 2010 and SharePoint Sever 2010.
2. Master Data Services: helps IT organizations centrally manage critical data assets companywide and across diverse systems, and enables more people to securely manage master data directly, and ensure the integrity of information over time.
3. Application and Multi-server Management: helps organizations proactively manage database environments efficiently at scale through centralized visibility into resource utilization and streamlined consolidation and upgrade initiatives across the application lifecycle.
4. Report Builder 3.0: report authoring component with support for geospatial visualization. This new release provides capabilities to further increase end user productivity with enhanced wizards, more powerful visualizations, and intuitive authoring.
5. StreamInsight: a low latency complex event processing platform to help IT monitor, analyze and act on the data in motion to make more informed business decisions in near real-time.

For more information about this new product, please visit our site http://hostforlife.eu/SQL-2008-R2-European-Hosting.aspx.

About HostForLife

As a leading small to mid-sized business web hosting provider, we strive to offer the most technologically advanced hosting solutions available to our customers across the world. Security, reliability, and performance are at the core of our hosting operations to ensure each site and/or application hosted on our servers is highly secured and performs at optimum level. Unlike other web hosting companies, we do not overload our servers.



European ASP.NET 4.0 Hosting :: Error Message - A potentially dangerous Request.QueryString value was detected from the client

clock May 13, 2011 07:26 by author Scott

For those of you who just upgraded your site to the latest ASP.NET 4.0 Framework, you may sometimes see this error message: “A potentially dangerous Request.QueryString value was detected from the client”.

The request validation feature in ASP.NET provides a certain level of default protection against cross-site scripting (XSS) attacks. In previous versions of ASP.NET, request validation was enabled by default. However, it applied only to ASP.NET and only when those pages were executing.

In ASP.NET 4, by default, request validation is enabled for all requests, because it is enabled before the BeginRequest
phase of an HTTP request. As a result, request validation applies to requests for all ASP.NET resources, not just .aspx page requests. This includes requests such as Web service calls and custom HTTP handlers. Request validation is also active when custom HTTP modules are reading the contents of an HTTP request.

As a result, request validation errors might now occur for requests that previously did not trigger errors. To revert to the behavior of the ASP.NET 2.0 request validation feature, add the following setting in the Web.Config  file:

<httpRuntime requestValidationMode="2.0" />

However, we recommend that you analyze any request validation errors to determine whether existing handlers, modules, or other custom code accesses potentially unsafe HTTP inputs that could be XSS attack vectors.

If you have problem with this upgrade, you can host your site with us. We are the premier European hosting that support ASP.NET 4 hosting with only €3.00/month. If you don’t like our service, you can just cancel your account.



European ASP.NET 4.0 Hosting :: How to Trigger the Client-side Validation Manually

clock May 10, 2011 06:10 by author Scott

By default the client-side validation is triggered when submitting forms using buttons. However, sometimes you may want to trigger client-side validation on your ASP page manually from custom Javascript. You can achieve that by calling Javascript validation functions provided by the ASP.Net framework directly from your custom code.

The following page source example displays a
TextBox and its validation controls (RequiredFieldValidator & ValidationSummary). The validation controls have the same ValidationGroup defined, which allows us to validate different page elements independently. The page displays also a DIV
element that will cause the Validation action when clicked:

<!-- Validation Summary -->
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
            HeaderText="Validation errors:" ValidationGroup="Group1"/> 

<!-- TextBox and its validator -->
Name: <asp:TextBox ID="TextBox1" runat="server" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
            ErrorMessage="Name is required" Text="*"
            ControlToValidate="TextBox1" ValidationGroup="Group1"> /> 

<!-- Div that causes client-side validation when clicked -->
<div onclick="Validate();" >Validate Form</div>


The code above should should produce smth like that when validation is triggered:



Now let's take a look at the custom JS code that triggers the validation. There are couple ways to do that:

- Easy way - works for all validators from the same ValidationGroup:

function Validate()
{
    // If no group name provided the whole page gets validated

    Page_ClientValidate('Group1');
}

- If you want to validate only specific validators:

function Validate()
{

    // Get the specific validator element
    var validator = document.getElementById('RequiredFieldValidator1');

     // Validate chosen validator
    ValidatorValidate(validator);

    // Update validation summary for chosen validation group
    ValidatorUpdateIsValid();
    ValidationSummaryOnSubmit(validationGroup);
}



European ASP.NET 4.0 Hosting :: Sending Email from ASP.Net 4 - C# Sample

clock May 6, 2011 07:15 by author Scott

Below is sample code showing how to send email from ASP.Net 4 (currently in beta as of this posting) using C#. With this code I am assuming that the server already has a local SMTP service installed, so I use "localhost" to relay the email.

Here is the SendMail.aspx page:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SendMail.aspx.cs" Inherits="SendMail" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        Message to:
        <asp:TextBox ID="txtTo" runat="server"></asp:TextBox>
        <br />
        Message from:
        <asp:TextBox ID="txtFrom" runat="server"></asp:TextBox>
        <br />
        Subject:
        <asp:TextBox ID="txtSubject" runat="server"></asp:TextBox>
        <br />
        Message Body:
        <br />
        <asp:TextBox ID="txtBody" runat="server" Height="171px" TextMode="MultiLine"
            Width="270px"></asp:TextBox>
        <br />
        <asp:Button ID="Btn_SendMail" runat="server" onclick="Btn_SendMail_Click"
            Text="Send Email" />
        <br />
        <br />
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    </div>
    </form>
</body>
</html>

Here is the source code of the SendMail.aspx.cs page:

using System;
using System.Web.UI.WebControls;
using System.Net.Mail;


public partial class SendMail : System.Web.UI.Page

{
    protected void Btn_SendMail_Click(object sender, EventArgs e)
    {
        MailMessage mailObj = new MailMessage(
            txtFrom.Text, txtTo.Text, txtSubject.Text, txtBody.Text);
        SmtpClient SMTPServer = new SmtpClient("localhost");
        try
        {
           SMTPServer.Send(mailObj);
        }
            catch (Exception ex)
        {
            Label1.Text = ex.ToString();
        }
    }
}

Hope this tutorial can help!!



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