Windows 2012 Hosting - MVC 6 and SQL 2014 BLOG

Tutorial and Articles about Windows Hosting, SQL Hosting, MVC Hosting, and Silverlight Hosting

Windows Hosting - ASPHostPortal.com :: Easy Steps to Reset Windows Server 2012 R2 Lost Admin Password?

clock October 24, 2016 12:36 by author Dan

According to Lan Lin Fan article, Is resetting Windows server 2012 r2 admin password difficult, if we lost the the privilege to logon or access server 2012 r2 computer or domain controller? The answer is not absolute. For example, if you have password reset disk or another administrator available, Windows server 2012 r2 lost admin password would be reset instantly. Or if you have backup Windows system status with disk, such as Windows system restore disc, you could restore Windows server 2012 r2 to early system point.

Even though there are not anything available for recovering server 2012 r2 password, Windows system 2012 r2 installation disk and third-party recovery tool would help you too. First, Windows system installation disk reset Windows server 2012 r2 admin password.

Preparation: a copy of Windows server 2012 r2 installation disk

The key step of resetting server 2012 r2 admin password with installation disk is to replace Utilman.exe.

1. Boot off Windows disk and select the "Repair your computer" option from the lower left-hand corner.
2. Get to the option to open the Command Prompt.
3. Type the following commands to back up the utilman.exe file:
MOVE C:WindowsSystem32Utilman.exe C:WindowsSystem32Utilman.exe.bak
4. Copy cmd.exe and rename it Utilman.exe.
COPY C:WindowsSystem32cmd.exe C:WindowsSystem32Utilman.exe
Now you can go ahead and reboot your machine. When it's done booting up again and you are at the Logon screen click on the Ease of access icon. Now you have replaced Utilman.exe with cmd.exe.
5. Command Prompt opens, type following commands:
net user administrator *

Once you press Enter, you will be asked to set a new password and then confirm it. When entering new one, don't worry if you can't see it, because it is invisible, however it has been remembered. Once you're logged in again, don't forget to delete Utilman.exe and then rename Utilman.exe.bak back to plain old Utilman.exe. Second, reset server 2012 r2 admin password with third-party Windows password genius.

Windows Password Genius has four versions available, standard, professional, advanced and raid. And the raid version is special, because it works for raid server Windows domain or local admin password reset. The advanced is general version, working on both server and client computers.

So choose appropriate Windows password recovery version to burn a password reset disk and then recover Windows server administrator password.

Preparation: Windows Password Genius Advanced/Raid, available computer and bootable USB drive.

1. Install Windows Password Genius Raid, and run it on available computer.
2. Insert bootable USB drive into this available computer and choose USB, click "Begin burning" to create password reset disk with USB.
3. Exit USB device after it is successfully burned with password reset disk.
4. Plug USB into server 2012 r2 and boot server from USB.
5. Recovery tool program runs, and then choose Windows system - Windows serve 2012 r2, and select user account - administrator.
6. Click "Reset Password", the administrator would be set with new password "[email protected]".
7. At last, reboot server computer to finish Windows password reset. But remember to exit USB reset disk from server before your server computer boots from hard disk successfully.

Best Windows Server 2012 Hosting Recommendation

ASPHostPortal.com provides our customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server 2012. We offers Windows hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable Windows server 2012 Hosting, we should be your best choice.



Windows Hosting - ASPHostPortal.com :: Save Your Important Data Using Windows Server Backup

clock October 10, 2016 21:11 by author Dan

Windows Server Backup is a unique feature that enables regular backups and recovery solutions for computers running Windows Server 2008. The new backup and recovery technology was introduced to replace the previous NTBackup feature that was in earlier Windows versions. This program automatically performs back up operations for critical data and can also be used to restore the data for supported applications. In fact, the backup feature can be used for backing up a full Server or selected volumes according to user's needs.

With this server backup, it is easy to manage disasters when they occur. This is possible through recovery options for backed up volumes, folders, files, applications or even system state. A system recovery using Server Backup program can restore a complete server to a new hard drive in case of disk volume failures. This can be done using the full Windows recovery environment. Besides local computers, this new Backup also supports creation and management of backups for remote computers.

The server backup solution is an appropriate feature not only for system administrators but for anyone who needs backup solutions. It is suitable for small businesses as well as large companies. In fact, you do not need to be an IT professional to use new this new backup program. It is actually suited for individuals with basic computer skills especially in data recovery and backup. Technically, Windows Server Backup also provides APIs for cloud integration.

To run this program, you have to be in the group of administrators or Backup operators as a special consideration. Using the MMC (Microsoft Management Console) snap-in, you can actually manage the backups of another computer with Windows Server Backup. However, since the firewall is enabled by default in Windows 2008, you might encounter several security issues in the process. Luckily, these issues can be resolved by making relevant changes in the firewall. With these exciting new features included in this feature Backup program, it becomes much easier to perform and manage data recovery operations in a convenient manner; its few drawbacks outlined below notwithstanding.

One drawback with Windows 2008 is that current users of previous versions of Windows Server cannot upgrade old settings to the new Windows Server Backup feature. These settings have to be reconfigured after running an upgrade. A separate and dedicated disk is also required for running scheduled backups. Moreover, backing up data on tape is no longer supported in Server program and only locally attached disks can be backed up. To recover data from backups created with previous Server versions, you have to install NTBackup for Windows Server 2008.

With its faster backup technology, the backup software is a convenient and versatile backup tool in Windows server 2008. Restoration of items is much simpler as you can selectively choose what to restore. Backups can also be scheduled to run automatically without any user input. One-time backups can be performed to complement the automatic backups. With cloud integration, cloud backups can be synchronized with local backups through the MMC snap-in in Server Backup solution.

Best Windows Server 2012 Hosting Recommendation

ASPHostPortal.com provides our customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server 2012. We offers Windows hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable Windows server 2012 Hosting, we should be your best choice.



Windows Hosting - ASPHostPortal.com :: All About MCSA (Windows Server 2012 Certification)

clock October 9, 2016 06:49 by author Dan

Windows server 2012 has a graphical user interface based on Metro Design language and a new server manager. Windows Server 2012 R2 is the primary organ of Microsoft's Cloud Platform vision which brings Microsoft's experience of delivering global-scale cloud services into one's infrastructure with new enhanced features in virtualization, virtual desktop infrastructure, networking, management, storage, access, information protection, the web and application platform, and more.

The Windows Server training is aimed at providing an individual with the major details of Windows Server 2012 which covers seven modules under this course: Server Virtualisation, Management automation, Networking, Storage, Identity and access, Virtual desktop infrastructure, and Web & Application platform. Entire course offers the aspects of the new capabilities, features, and solutions assembled into Windows Server 2012. With so many new features to put under cover, the described course is designed to be the initiation to Windows Server 2012. On the course completion, an individual will be able to plunge deeper into Windows Server 2012 through additional courses in Microsoft Virtual Academy (MVA).

MCSA: Windows Server 2012 certifies you and makes you eligible for a position as a network systems administrator or as a computer network specialist, and is regarded as the first step towards becoming an MCSE. The foundation course trains a candidate on basic concepts of windows server and comes under the list of top five in-demand IT certifications.In order to pursue this course, one must have the fundamental knowledge of Networking.

Since traditional data centers were constructed with the physical servers running unwavering workload and eventually required more potential against cost savings, server 2012 Hyper-V made it easier for organizations to save costs of virtualisation and make optimum use of servers. Hyper-V can be taken in use to run multiple operating systems efficiently.

In today's world cloud and mobility are two major fashions that have started to affect the IT infrastructure. Microsoft users can build the private cloud today with it, Hyper-V, and Microsoft system Center. Further, one can increase efficiency in a data center to achieve operational excellence.

The MCSA certification is one of the most demanded IT certifications offered by Microsoft takes in a wide array of opportunities in the field of technology. The MCSA also fulfills the prerequisite for the MCSE certification for those looking to continue down the certification path. There are assorted benefits of earning this certification including the fact that it will substantiate your expertise in working with a number of Microsoft technologies and products. This certification will enhance your skill sets and knowledge in such a manner that organizations will look up to you as a technical leader who possesses the capability to successfully implement a wide range of Microsoft business solutions for the corporation.

The average salary for an MCSA certified professional varies with regards to the designation. The key area of certification plays a vital role in defining the job contour, for example: If you achieve this certification then you will be eligible for the position of computer systems or network administrator or may be a computer network specialist.

The compensation offered to MCSA certified candidates ranges according to the job responsibilities and their experience. A candidate with less than 1-year experience will probably draw $50,649 and this may increase up to $75,850 within next 10 years of experience or even more.

As mentioned above, reputed Multinationals hire MCSA certified professionals to manage the key roles as a Network administrator, Network operations analyst, Systems administrator, Technical support specialist, and Network technician.

The extent of opportunities and possibilities lying under an MCSA windows server 2012 certification are vast and immeasurable where mid and the senior level positions are regulated by the future skills you gain and years of experience you have.

Best Windows Server 2012 Hosting Recommendation

ASPHostPortal.com provides our customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server 2012. We offers Windows hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable Windows server 2012 Hosting, we should be your best choice.



ASP.NET Hosting - ASPHostPortal.com :: How to Bind Data to a Label From a SqlDataSource

clock April 25, 2016 21:24 by author Dan

Label controls in ASP.NET don't have a smart tag that allows you to select a data source, so at first glance, it is not easy to see how to bind a value returned from a SqlDataSource or AccessDataSource control to the label. Here's how to programmatically access the data returned by such a DataSource and apply it to a non-databound control.

To programmatically access the contents of a SqlDataSource or AccessDataSource control you need to explicitly call its Select() method. This method accepts a single input parameter of type DataSourceSelectArguments. This parameter can contain information regarding the filters to apply or the column to Order By. For example, when working with a sortable GridView, sorting a column calls the Select() method, and passes in a DataSourceSelectArguments instance with its SortExpression property set to the column name the user chose to sort by. If you don't want the DataSource to sort or filter, you pass in DataSourceSelectArguments.Empty.

Depending on the DataSourceMode of the DataSource control, one of two objects are returned when the Select() method is called. If the DataSourceMode is set to DataReader, a DataReader object is returned. The type of DataReader (SqlDataReader, OleDbDataReader, OdbcDataReader etc) that is returned depends entirely on the provider type used - in other words, whether you are using the OleDb provider, SqlClient provider etc. It has nothing to do with the type of DataSource control. The examples below both query an Access database, but one uses the AccessDataSource control, and the other uses the SqlDataSource control. Both return OleDbDataReaders, because it is the OleDbProvider library that is used for the connection.

If the DataSourceMode is set to Dataset, or not set at all (which means that the default setting of Dataset is used) the object that is returned is a DataView. A DataView is like a DataTable on steroids. It exposes methods that allow you to filter and sort data, for example, and bind it. A DataView contains a collection of DataRowView objects, which represent each row in the returned results.

So, with a DataReader, you would access the values during the DataReader.Read() operation, in very much the same way as if you are using plain ADO.NET code, whereas with the DataSet, you would need to create an object of the appropriate type - DataView, then iterate the DataRowView collection to access the values. In this, the code is remarkably similar to accessing values directly from a DataSet's table collection using plain ADO.NET.

The code below shows the contents of an aspx file, which contains two label controls, and two SqlDataSource controls. Each SqlDataSource control has its DataSource mode set to alternative values - DataSet and DataReader, and both of them have an OnSelecting event defined in which the value of the EmployeeID parameter is assigned:

<asp:Label ID="Label1" runat="server" /> <asp:Label ID="Label2" runat="server" />

<asp:SqlDataSource
    ID="SqlDataSource1"
    runat="server"
    ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
    ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"
    DatasourceMode="DataSet"
    SelectCommand="SELECT [LastName], [FirstName] FROM [Employees] WHERE ([EmployeeID] = ?)"
    OnSelecting="SqlDataSource1_Selecting">
    <SelectParameters>
        <asp:Parameter Name="EmployeeID" Type="Int32" />
    </SelectParameters>
</asp:SqlDataSource>

<asp:SqlDataSource
    ID="SqlDataSource2"
    runat="server"
    ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
    ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"
    DatasourceMode="DataReader"
    SelectCommand="SELECT [LastName], [FirstName] FROM [Employees] WHERE ([EmployeeID] = ?)"
    OnSelecting="SqlDataSource2_Selecting">
    <SelectParameters>
        <asp:Parameter Name="EmployeeID" Type="Int32" />
    </SelectParameters>
</asp:SqlDataSource>


The following code snippet shows the aspx.cs file contents, where the parameter values are set in the Selecting event handler. In the Page_Load method, the data returned by each of the Sql DataSource controls is accessed and a value consigned to a label. The method of access depends on the DataSource mode, but is identical for both SqlDataSource and AccessDataSource:

[C#]
protected void Page_Load(object sender, EventArgs e)
{

    DataView dvSql = (DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty);
    foreach (DataRowView drvSql in dvSql)
    {
        Label1.Text = drvSql["FirstName"].ToString();
    }

    OleDbDataReader rdrSql = (OleDbDataReader)SqlDataSource2.Select(DataSourceSelectArguments.Empty);
    while (rdrSql.Read())
    {
        Label2.Text = rdrSql["LastName"].ToString();

    }
    rdrSql.Close();
}



protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
{
    e.Command.Parameters["EmployeeID"].Value = 2;
}

protected void SqlDataSource2_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
{
    e.Command.Parameters["EmployeeID"].Value = 2;
}

[VB]
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)

Dim dvSql As DataView =
    DirectCast(SqlDataSource1.Select(DataSourceSelectArguments.Empty), DataView)
    For Each drvSql As DataRowView In dvSql
        Label1.Text = drvSql("FirstName").ToString()
    Next

Dim rdrSql As OleDbDataReader =
    DirectCast(SqlDataSource2.Select(DataSourceSelectArguments.Empty), OleDbDataReader)
    While rdrSql.Read()

        Label2.Text = rdrSql("LastName").ToString()
    End While
    rdrSql.Close()
End Sub

Protected Sub SqlDataSource1_Selecting(ByVal sender As Object,
    ByVal e As SqlDataSourceSelectingEventArgs)
    e.Command.Parameters("EmployeeID").Value = 2
End Sub

Protected Sub SqlDataSource2_Selecting(ByVal sender As Object,
    ByVal e As SqlDataSourceSelectingEventArgs)
    e.Command.Parameters("EmployeeID").Value = 2
End Sub


When using this technique with Sql Server - or more specifically the SqlClient provider, change OleDbDataReader to SqlDataReader in the above code. Happy Coding.

Best Windows Shared Hosting Recommendation

ASPHostPortal.com provides our customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Our Shared Hosting. We offers Windows hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable Windows Shared Hosting, we should be your best choice.



ASP.NET Hosting - ASPHostPortal.com :: How to solve page html getting wrongly appended to file being downloaded

clock April 18, 2016 21:24 by author Dan

Today while writing a small web application where I needed to download a datatable as csv file. I faced issue of page html getting wrongly appended to file being downloaded. I was using Response.Write to download file on client machine.

Solution to my problem was easy, I just needed to add an extra line telling content-length. Below is method that I finally ended up using.

        private void DownloadDataAsCsv(DataTable dt)
        {
            string tab = "";
            StringBuilder sb = new StringBuilder();
            foreach (DataColumn dc in dt.Columns)
            {
                sb.Append(tab + dc.ColumnName);
                tab = ",";
            }
            sb.Append("\n");
            int i;
            foreach (DataRow dr in dt.Rows)
            {
                tab = "";
                for (i = 0; i < dt.Columns.Count; i++)
                {
                    sb.Append(tab + dr[i].ToString());
                    tab = ",";
                }
                sb.Append("\n");
            }
            Response.ClearHeaders();
            Response.ClearContent();
            Response.ContentType = "application/vnd.ms-excel";
            Response.AddHeader("content-disposition", "attachment; filename=Export.csv");
            Response.AddHeader("Content-Length", sb.ToString().Length.ToString());
            Response.Write(sb.ToString());
            Response.Flush();
            Response.End();
        }

Best Windows Shared Hosting Recommendation

ASPHostPortal.com provides our customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Our Shared Hosting. We offers Windows hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable Windows Shared Hosting, we should be your best choice.



ASP.NET Hosting - ASPHostPortal.com :: How to Prevent ASP.NET Website From Multiple Database Request

clock October 26, 2015 20:44 by author Dan

It is not good to execute multiple db request for loading single page.  Review your database code to see if you have request paths that go to the database more than once. Each of those round-trips decreases the number of requests per second your application can serve. By returning multiple resultsets in a single database request, you can cut the total time spent communicating with the database.

In order to improve performance you should execute single stored proc and bring multiple resultset in to single db request.  In this article i will explain you how to avoid multiple database request and how to bring multiple resultset into single db request.

Consider a scenario of loading a Product Page, which displays

  • Product Information and
  • Product Review Information

In order to bring 2 database request in single db request, your sql server stored proc should be declared as below.

SQL Server Stored Proc

CREATE PROCEDURE GetProductDetails
 @ProductId bigint,
AS
SET NOCOUNT ON

--Product Information
Select ProductId,
 ProductName,
 ProductImage,
 Description,
 Price
From Product
Where ProductId = @ProductId

--Product Review Information
Select  ReviewerName,
 ReviewDesc,
 ReviewDate
From ProductReview
Where ProductId = @ProductId

Asp.net, C# Code to bring multiple db request into single db request

Code Inside Data Access Class Library (DAL)

public DataSet GetProductDetails()
{
SqlCommand cmdToExecute = new SqlCommand();
cmdToExecute.CommandText = "GetProductDetails";
cmdToExecute.CommandType = CommandType.StoredProcedure;
DataSet dsResultSet = new DataSet();
SqlDataAdapter adapter = new SqlDataAdapter(cmdToExecute);

try
{
    var conString = System.Configuration.ConfigurationManager.ConnectionStrings["ConnStr"];
    string strConnString = conString.ConnectionString;
    SqlConnection conn = new SqlConnection(strConnString);

    cmdToExecute.Connection = conn;

    cmdToExecute.Parameters.Add(new SqlParameter("@ ProductId", SqlDbType.BigInt, 8, ParameterDirection.Input, false, 19, 0, "", DataRowVersion.Proposed, _productId));

    //Open Connection
    conn.Open();

    // Assign proper name to multiple table
    adapter.TableMappings.Add("Table", "ProductInfo");
    adapter.TableMappings.Add("Table1", "ProductReviewInfo");
    adapter.Fill(dsResultSet);

    return dsResultSet;             
}
catch (Exception ex)
{
    // some error occured.
    throw new Exception("DB Request error.", ex);
}
finally
{
    conn.Close();
    cmdToExecute.Dispose();
    adapter.Dispose();
}
}

Code Inside Asp.net .aspx.cs page

protected void Page_Load(object sender, EventArgs e)
{
   if (Request.QueryString[ProductId] != null)
   {
      long ProductId = Convert.ToInt64(Request.QueryString[ProductId].ToString()); 
  
      DataSet dsData = new DataSet();

      //Assuming you have Product class in DAL
      ProductInfo objProduct = new ProductInfo();
      objProduct.ProductId = ProductId;
      dsData = objProduct.GetProductDetails();

      DataTable dtProductInfo = dsData.Tables["ProductInfo"];
      DataTable dtProductReviews = dsData.Tables["ProductReviewInfo"];

      //Now you have data table containing information
      //Make necessary assignment to controls
      .....
      .....
      .....
      .....
      ..... 

    }
}


Finish, Happy coding.

Best Windows Shared Hosting Recommendation

ASPHostPortal.com provides our customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Our Shared Hosting. We offers Windows hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable Windows Shared Hosting, we should be your best choice.



ASP.NET MVC Hosting - ASPHostPortal.com :: Simple Way to Upload File in ASP.NET MVC 4.0 Razor

clock October 19, 2015 19:00 by author Dan

In this tutorial I will show you how to upload a files in ASP.NET MVC 4.0. So how to do this?? Lets get start. Create a new MVC 4.0 application and add a new controller, name it as HomeController. We will use Index ActionMethod to write the code to upload the file.

We need two ActionMethod named Index, one is for HttpGet and another for HttpPost. Within the HttpGet ActionMethod we don't need to write anything.

Lets create the View first. To create the View right click on the ActionMethod Index and click on the Add View option.

In the View write down the code.

@{
    ViewBag.Title = "Upload file";
}

<h2>Upload File</h2>
<h3 style="color: green">@ViewBag.Message</h3>
@using (Html.BeginForm("Index", "Home", FormMethod.Post
            , new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary();

    <input type="file" id="fileToUpload" name="file" />
    <span class="field-validation-error" id="spanfile"></span>

    <input type="submit" id="btnSubmit" value="Upload" />
}


Here we have taken a simple HTML file up loader and a submit button. Within the form we are calling the ActionMethod Index, which is present in HomeController. A ValidationSummary to show all validation message.

Now get back to the ActionMethod. Within the Index ActionMethod (HttpPost) write down the code.

[HttpPost]
public ActionResult Index(HttpPostedFileBase file)
{
      if (ModelState.IsValid)
      {
           if (file == null)
           {
              ModelState.AddModelError("File", "Please Upload Your file");
           }
           else if (file.ContentLength > 0)
           {
              int MaxContentLength = 1024 * 1024 * 4; //Size = 4 MB
              string[] AllowedFileExtensions = new string[] { ".jpg", ".gif", ".png", ".pdf" };
           if (!AllowedFileExtensions.Contains
(file.FileName.Substring(file.FileName.LastIndexOf('.'))))
           {
                 ModelState.AddModelError("File", "Please file of type: " + string.Join(", ", AllowedFileExtensions));
           }
           else if (file.ContentLength > MaxContentLength)
           {
                 ModelState.AddModelError("File", "Your file is too large, maximum allowed size is: " + MaxContentLength + " MB");
            }
            else
            {
                 var fileName = Path.GetFileName(file.FileName);
                 var path = Path.Combine(Server.MapPath("~/Upload"), fileName);
                 file.SaveAs(path);
                 ModelState.Clear();
                 ViewBag.Message = "File uploaded successfully. File path :   ~/Upload/"+fileName;
             }
         }
     }
     return View();
}


Before run this project don't forget to create a Upload folder within root directory, otherwise you will get an error.

HttpPostedFileBase file getting the file which you are uploading.

file.ContentLength : Size of the file
file.FileName : file name with extension

Now run your project and enjoying your uploading.

Best Windows Shared Hosting Recommendation

ASPHostPortal.com provides our customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Our Shared Hosting. We offers Windows hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable Windows Shared Hosting, we should be your best choice.



ASP.NET Hosting - ASPHostPortal.com :: How to Remove Html Tags from a String in ASP.NET

clock October 12, 2015 07:47 by author Dan

When we update content using WYSIWYG HTML editor (ck-editor) then it used HTML tag for formatting the content. But some time we need the same content without any formatting so then we require the removing HTML tag from that content.

Here I use two variation for this first one is using a simple loop And Second one is using Regex.

// How convert a html tag to blank space in a string using c#.net/asp.net code
// Replacing the html tag <> to blank space, you can copy data with html tag and then convert to normal text
// eg. INPUT   -->  <div width="5">Testing <i>Testing</i></div>
        OUTPUT--> Testing Testing
//
//C#.NET , ASP.NET

Method 1 : (Using Character Array)

 public string replace(string s)
 {
    int l = s.Length;
    int j = 0;
    char[] ch = s.ToCharArray();
    s = "";
    for (int i = 0; i < l; i++)
    {
        if (ch[i] == '<')
            j = 1;
        if (j == 1)
        {
            if (ch[i] == '>')
                j = 0;
            ch[i] = ' ';
        }
        s = s + ch[i].ToString();
    }
    return (s);
 }

Method 2 (Using Regular Expressions- Regex)

 using System.Text.RegularExpressions;
 public string replace(string s)
 {
   String result = Regex.Replace(s, @"<[^>]*>", String.Empty);
 }

Finish.. Happy Codiing..

Best Windows Shared Hosting Recommendation

ASPHostPortal.com provides our customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Our Shared Hosting. We offers Windows hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable Windows Shared Hosting, we should be your best choice.



Windows Hosting - ASPHostPortal.com :: Which is better Online Or Offline Windows Server Backup?

clock June 25, 2015 06:23 by author Dan

The backup can also be initiated with certain scheduled activities or based mostly on time. A very good support will provide a total answer alongside with round the clock guidance and remote management functionalities. Knowledge forms the core of any company, and windows server backup plays a essential position in securing your data in the experience of all hazards and offers seamless recoverability following a catastrophe.

Backing up server (computer systems, numerous server plans and other apps) is essential in purchase to keep organization continuity. And offered the wants and scope of the IT nowadays, remote server backup for digital setup is getting to be increasingly crucial. Companies are deploying virtual servers into their IT atmosphere and so it is crucial to style and employ a disaster restoration prepare for digital setting.

Remote server backup equipment for digital surroundings

There are many choices accessible in the market place when it will come to backing up virtual servers, but when picking a 3rd party resource for distant server backup, it is essential o choose a instrument which can differentiate among a physical and virtualized atmosphere. A digital equipment (VM) exists as an picture file on a bodily server, housing the OS with configuration options, programs and the corresponding info. Say if a VM file is allotted 200GB on the difficult travel and only 100GB is utilized, the digital server backup will identify it as a VM file and will back again up only that 100GB of information in distinction to a standard backup instrument, which would back again it up as a 200GB file.

Assigning storage place for distant server backup (digital server)

Even though a virtual server setting may possibly have a storage area community (SAN) keeping the VM documents, it is advisable to execute disk-to-disk backup to economical storage disks. Digital server backup resources consider a level-in-time snapshot of the VM impression and only the changes manufactured in the original are stored in the backup copy. Consequently it is observed that storage needs for virtual backup would not increase substantially above the time period and receiving more disks would not confirm to be an high-priced affair. Nevertheless it should be remembered that deploying a SAN just for virtual server backup can be high-priced. Additionally introducing far more disks to fulfill the mounting storage calls for can additional incorporate to the costs.

Computing and networking prerequisite for remote server backup (in scenario of digital server)

In circumstance of a digital server backup that creates a backup VM, the adjustments produced to the first are synchronized with the backup duplicate. As a result it is important that you 1st decide the methods needed to take care of peak workloads throughout all VMs and then boost CPU allocation so that backups do not consume into the methods allocated to apps. Not like the bodily servers, every single of which is offered a committed network interface card (NIC) for I/O functions, I/O from all VMs is envisioned to use a one NIC creating an I/O bottleneck. For that reason determine the total I/O throughput necessity for backing up VMs and if it is discovered to be on the greater aspect go with SAN-based mostly digital backup that can assistance great LAN pace.

Best Windows Shared Hosting Recommendation

ASPHostPortal.com provides our customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Our Shared Hosting. We offers Windows hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable Windows Shared Hosting, we should be your best choice.



WIndows Hosting - ASPHostPortal.com :: Windows Server Hosting Regarding Superior Productivity

clock June 5, 2015 06:22 by author Dan

Windows server is a chain of operating systems. Windows server can be used on business desktop, laptop, computers and servers. It is a widely acknowledged popular server operating system program. It is known for its ability under different application settings. Windows Server hosting bestows many benefits on the end user organization.

Anytime Anywhere Accessibility and Cost-Effective Solution

Using hosted dedicated Windows Server software ensures lot of time and capital saving. Windows Server hosting service provider enables users to access the hosted data at any time from any place. Users of a cloud computing and application hosting service provider only need an Internet connected device such as a laptop or personal computer or an iPhone, etc. This feature provides ease to the user.

It also allows multiple authorized users to access data simultaneously without any trouble. With this feature you can be far away from each other and still work together without any trouble. It improves collaboration between team members and enhances the ultimate output.

Reliable and Scalable

Windows Server host offers a scalable environment so that variations in business demands can be managed with no trouble. This helps user to save resources and improve return on investment. A cloud hosting service vendor provides high quality data center facilities for storing data. The data centers are situated at regions free from the risk of natural calamities. These data centers are well equipped with all the security tools required to keep the data safe.

Windows Server on Cloud Offers Acute Data Security

Windows Server hosting service providers host software via cloud computing technology, they deploy sophisticated security tools and technologies such as superb robust firewalls, top-notch antispyware, ultra sensitive antivirus software and much more. Windows Dedicated Server hosting service vendor also makes use of burglar and threat detection system, round the clock network checking, etc. The data centers are well equipped with highest possible standards.

The architecture of the threat discovery system provides a novel way of intrusion detection. It moves from identifying attacks to detecting threats and their properties. The architecture provides elasticity to the system so that it can be modified according to different environments. It is also able to use third party components when offered. The intrusion detection system detects the attacks on a network. Each attack is indicated by a warning that is forwarded to the threat classifier for further handling. There are many intrusion detection systems available such as Modsecurity, Snort, Bro, and OSSEC.

OSSEC is an open source and host based IDS. It executes log analysis, file integrity inspection, windows registry monitoring, real time alerting, rootkit detection, and active response. It runs on various operating systems, including AIX, Linux, MacOS, Solaris, HP-UX, and Windows operating system.

Technical Support Services

A cloud hosting service provider which offers Windows server Hosting solution provides round the clock support services to its users. The technical support service is generally free of cost. In case of any problem or query users can contact the certified technical experts and get their issue resolved. This feature eliminates the requirement of hiring in-house IT staff.

Rolling Data Backup

Users of cloud computing service provider get thirty days of rolling data backups. So users with Windows server hosting services don’t have to worry about data storage. If data gets lost or damaged then it can be easily retrieved via host’s server.

Best Windows Shared Hosting Recommendation

ASPHostPortal.com provides our customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Our Shared Hosting. We offers Windows hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable Windows Shared Hosting, we should be your best choice.



About ASPHostPortal.com

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

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


Author Link


Corporate Address (Location)

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

Sign in