All About ASP.NET and ASP.NET Core 2 Hosting BLOG

Tutorial and Articles about ASP.NET and the latest ASP.NET Core

ASPHostPortal.com Announces New Data Center in Germany

clock February 24, 2015 08:47 by author Dan

As a leading small to mid-sized business web hosting provider, ASPHostPortal.com is a company that works differently to most. Value is what we output and help the 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".

To serve our millions customers, we announce our new data center located in Frankfurt (Germany). Now, our customers can choose from our 8 different world-class data center (US (Washington & Seattle), Netherlands, Singapore, Hong Kong, United Kingdom, Australia, France (Paris), Germany (Frankfurt)).

We provide hosting service globally, All our servers are equipped with minimum Intel Dual Processor Multi Core, 8 GM RAM and the fastest 1,000 Mbps connection backbone. This is to ensure that all sites hosted on our server has an access to the best performance, reliability and connectivity feature.

With 10 years combined experience in .NET, PHP, Network Administration, System Integration and related technologies, we are an expert in the hosting market. We provide shared hosting, cloud hosting, reseller hosting, sharepoint hosting, etc with cheap price, complete features, uptime and 30 days money back guarantee. In addition, we have been awarded as one of the fastest hosting companies in the industry because of the good hosting performance that we provide. To learn more about our new data center, please visit http://asphostportal.com/Hosting-Data-Center-Germany

About ASPHostPortal.com :
ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET Hosting. ASPHostPortal.com has ability to support the latest Microsoft and ASP.NET technology, such as: such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch. ASPHostPortal include shared hosting, reseller hosting, and sharepoint hosting, with speciality in ASP.NET, SQL Server, and architecting highly scalable solutions. ASPHostPortal.com strives to supply probably the most technologically advanced hosting solutions available to all consumers the world over. Protection, trustworthiness, and performance are on the core of hosting operations to make certain every website and software hosted is so secured and performs at the best possible level.



ASP.NET Hosting - ASPHostPortal.com :: How to Convert DataTable To JSON String in ASP.NET

clock February 24, 2015 06:34 by author Mark

First of all you need to create an "ASP.NET Empty Web Site". Then use the following procedure.

Step 1

Create a ConvertDataTableToJson class in the App_Code folder and provide the following:

Convert DataTable To JSON String.       
    using System.Data 
    using System.Text; 
    public class ConvertDatatableToJson 
    { 
       public string DataTableToJson(DataTable dt) 
       { 
          DataSet ds = new DataSet(); 
          ds.Merge(dt); 
          StringBuilder JsonStr = new StringBuilder(); 
          if (ds != null && ds.Tables[0].Rows.Count > 0) 
          { 
             JsonStr.Append("["); 
             for (int i = 0; i < ds.Tables[0].Rows.Count; i++) 
             { 
                JsonStr.Append("{"); 
                for (int j = 0; j < ds.Tables[0].Columns.Count; j++) 
                { 
                   if (j < ds.Tables[0].Columns.Count - 1) 
                   { 
                      JsonStr.Append("\"" + ds.Tables[0].Columns[j].ColumnName.ToString() + "\":" + "\"" + ds.Tables[0].Rows[i][j].ToString() + "\","); 
                   } 
                   else if (j == ds.Tables[0].Columns.Count - 1) 
                   { 
                      JsonStr.Append("\"" + ds.Tables[0].Columns[j].ColumnName.ToString() + "\":" + "\"" + ds.Tables[0].Rows[i][j].ToString() + "\""); 
                   } 
                } 
                if (i == ds.Tables[0].Rows.Count - 1) 
                { 
                   JsonStr.Append("}"); 
                } 
                else    
                { 
                   JsonStr.Append("},"); 
                } 
             } 
             JsonStr.Append("]"); 
             return JsonStr.ToString(); 
          } 
          else 
          { 
             return null; 
          } 
       }

Step 2

Insert the grid view control into the Default.aspx page then write the following design code:

<asp:GridView ID="ui_grdVw_EmployeeDetail" runat="server" Width="50%" AutoGenerateColumns="false" HeaderStyle-CssClass="pageheading"> 
    <Columns> 
    <asp:TemplateField HeaderText="S.NO"> 
    <ItemTemplate> 
    <%#Container.DataItemIndex+1 %> 
    </ItemTemplate> 
    </asp:TemplateField> 
    <asp:TemplateField HeaderText="Employee ID"> 
    <ItemTemplate> 
    <asp:Label ID="ui_lbl_EmployeeID" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Emp_id") %>'></asp:Label> 
    </ItemTemplate> 
    </asp:TemplateField> 
    <asp:TemplateField HeaderText="Employee Name"> 
    <ItemTemplate> 
    <asp:Label ID="ui_lbl_EmployeeName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Emp_Name") %>'></asp:Label> 
    </ItemTemplate> 
    </asp:TemplateField> 
    <asp:TemplateField HeaderText="Employee Post"> 
    <ItemTemplate> 
    <asp:Label ID="ui_lbl_EmpJob" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Emp_job") %>'></asp:Label> 
    </ItemTemplate> 
    </asp:TemplateField> 
    <asp:TemplateField HeaderText="Department"> 
    <ItemTemplate> 
    <asp:Label ID="ui_lbl_Department" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Emp_Dep") %>'></asp:Label> 
    </ItemTemplate> 
    </asp:TemplateField> 
    </Columns> 
    </asp:GridView> 
    <br /> 
    <asp:Button ID="ui_btn_Convert1" runat="server" Text="Manually Convert To Json" OnClick="ui_btn_Convert1_Click" /><br /><br /><br /> 
    <asp:Label ID="ui_lbl_JsonString1" runat="server"></asp:Label>

Step 3

Now, open the Deafult.asps.cs then write the following code:
    using System; 
    using System.Data;
 

    public partial class _Default : System.Web.UI.Page 
    { 
       #region Global Variable 
       DataTable dt; 
       ConvertDatatableToJson dtJ; 
       string JsonString = string.Empty;    
       #endregion 
        
       protected void Page_Load(object sender, EventArgs e) 
       { 
          if (!IsPostBack) 
          { 
             ui_grdvw_EmployeeDetail_Bind(); 
          } 
       }       
       protected void ui_grdvw_EmployeeDetail_Bind() 
       { 
          dt = new DataTable(); 
          EmployeeRecord employeeRecord = new EmployeeRecord(); 
          dt = employeeRecord.EmpRecord(); 
          ViewState["dt"] = dt; 
          ui_grdVw_EmployeeDetail.DataSource = dt; 
          ui_grdVw_EmployeeDetail.DataBind(); 
       }       
       protected void ui_btn_Convert1_Click(object sender, EventArgs e) 
       { 
          dtJ = new ConvertDatatableToJson(); 
          JsonString = dtJ.DataTableToJson((DataTable)ViewState["dt"]); 
          ui_lbl_JsonString1.Text = JsonString; 
       } 
    }

Step 4

Press F5, run the project.

Now, convert the DataTable to a JSON string using the newtonsoft DLL.

Step 1

Download the Newtonsoft DLL and move it to the ASP.Net project's bin folder.

Step 2

Then, insert a button and label UI Control in the Deafult.aspx page as in the following:

<asp:Button ID="iu_btn_Convert2" runat="server" Text="Newtonsoft Convert To Json" OnClick="iu_btn_Convert2_Click" /> 
    <br /> 
    <br /> 
    <asp:Label ID="ui_lbl_JsonString2" runat="server"></asp:Label>

Step 3

Now, write the following code in Default.aspx.cs:
using this namespace

using Newtonsoft.Json;

And then:

protected void iu_btn_Convert2_Click(object sender, EventArgs e) 
    { 
       dt = (DataTable)ViewState["dt"]; 
       JsonString = JsonConvert.SerializeObject((DataTable)ViewState["dt"]); 
       ui_lbl_JsonString2.Text = JsonString; 
    }

Now, run the project and click on the Newtonsoft Convert to JSON     

Best ASP.NET Hosting Recommendation

ASPHostPortal.com provides its 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. ASPHostPortal.com offers ASP.NET hosting starts from $1/month only. They also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable ASP.NET Hosting, ASPHostPortal.com should be your best choice.   



ASPHostPortal.com Announces Fast Joomla 3.4 Hosting Solution

clock February 18, 2015 08:39 by author Dan

Supported by powerful servers, ASPHostPortal.com is one of the leading Windows hosting providers offering quality service with premium support. Our servers are built using the latest technology. We are passionate about hosting and strive to deliver an excellent level of service to each customer. Our web hosting plans are suitable for small to medium-sized blogs, personal, charity or business websites. Today, we launch Joomla 3.4 hosting with superior technology and affordable price.

Joomla is an award-winning content management system (CMS), which enables you to build Web sites and powerful online applications. Many aspects, including its ease-of-use and extensibility, have made Joomla the most popular Web site software available. Best of all, Joomla is an open source solution that is freely available to everyone. Now, Joomla has released the new version Joomla 3.4

What’s new in Joomla! CMS 3.4

Front-end Module Editing
Incorporating Front End Module editing allows you to edit modules directly on the page without the need to use the admin dashboard.

Decoupling com_weblinks
Joomla accomplished the first step in this is by removing com_weblinks from the core distribution. These extensions are maintained on GitHub.

Composer Integration

Joomla is integrating Composer into the CMS for managing external dependencies such as the Joomla! Framework and PHPMailer.

No CAPTCHA reCAPTCHA
Google introduced a no CAPTCHA CAPTCHA API in December 2014. We updated the reCAPTCHA plugin to protect your login and registration forms against spam.

Core en-GB standardization
It will provide translation teams with an easy framework and guidelines to create their own style guides to ensure consistency throughout the project.

With more than 1 million followers, ASPHostPortal is an expert in the hosting market. We provide Joomla 3.4 Hosting only for $5/month with 30 days money back guarantee. In addition, we have been awarded as one of the fastest hosting companies in the industry because of the good hosting performance this web host provides. To provide fast hosting speed, our company utilizes 6 state-of-the-art data centers located in the USA, Netherlands, Singapore, France, United Kingdom and Australia. To learn more about Joomla 3.4 Hosting, please visit http://asphostportal.com/Joomla-3-4-Hosting

About ASPHostPortal.com:
ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET Hosting. ASPHostPortal.com has ability to support the latest Microsoft and ASP.NET technology, such as: such as: WebMatrix, Web Deploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch. ASPHostPortal include shared hosting, reseller hosting, and Sharepoint hosting, with speciality in ASP.NET, SQL Server, and architecting highly scalable solutions. ASPHostPortal.com strives to supply probably the most technologically advanced hosting solutions available to all consumers the world over. Protection, trustworthiness, and performance are at the core of hosting operations to make certain every website and software hosted is so secured and performs at the best possible level.



ASP.NET Hosting - ASPHostPortal.com :: How to Debug Your ASP.NET Projects Running Beneath IIS

clock February 18, 2015 06:06 by author Ben

If you've carried out any coding in ASP.NET then you understand how critical debugging is. By default Visual Studio comes with its personal stripped down web service that it runs every single time you debug your application as a way to serve up pages. 90% of the time that little net server just isn't powerful or quick enough to maintain up with an enterprise level application. A lot of organizations will have you map your web site to [Internet Information Services][IIS] that is a suitable internet server that comes with Windows. IIS features a lot a lot more possibilities and is much more robust for application hosting (understandably considering that which is its whole goal) whereas the little web service that starts inside the default configuration of visual studio hardly compares.


The downside of possessing your application run by IIS is that it's not immediately apparent how you can debug the application. Pressing F5 nevertheless tries to launch the dinky internet service that comes with Visual Studio. Lots of people speedily determine that they could attach to the procedure thread began by IIS for the application it's operating. It really is generally named one thing like "w3wp.exe". You do this by going to the "debug" menu in Visual Studio and then choosing "Attach to Process". This brings up a bit window having a list of running processes. Obtaining the IIS method for the application and clicking attach will then start Visual Studio's debugger. You are able to then hit the pages hosted by IIS and hit your breakpoints within your code.

Even though this really is fine and functions, it is a giant discomfort to visit Debug > Attach to Process every single single time you must debug your application. You can generate a macro that would do the work for you personally, but why create a macro when Visual Studio will actually do it for you. Let me show you how to setup your project to work with IIS by default when debugging. You will not ever need to navigate your procedure tree once more.

You'll find two forms of internet projects in .NET, Internet sites and Web Applications. There is considerably debate about which 1 is far better for development, but this post is not about that so I will not get into it right here. Nonetheless, these two project varieties have distinct properties menus and configuring them to use IIS when debugging is slightly different in each and every of them. For simplicity's sake I decided to break it up into two sections, one for net apps, and one for websites. Please see the section that corresponds for your project variety. (If you're making use of ASP.NET MVC then you are utilizing a internet application)

Web sites

If your project is actually a website and not a net app, then listed below are the measures to configure it to use IIS when debugging. This assumes you already have IIS setup and hosting your project.

  1. First open up your project and open the solution explorer.
  2. Right-click on your project node and navigate to "Property Pages".
  3. Navigate to "Start Options" item in the left pane.
  4. In the "Server" section make sure "Use custom server" is checked.
  5. In the "Base URL:" field put in the address you have mapped to your project. (Usually the address you put in your hosts file)
  6. You're basically done, but another option I like to set on this page is "Don't open a page. Wait for request from an external application." I set this because I don't like closing a million browser tabs for every time I debug. I usually just leave my browser open behind visual studio and when I debug I prefer to just switch to the browser and refresh rather than have Visual Studio open a new tab.

Web Applications

If your project is a web application and not a website, then here are the steps to configure it to use IIS when debugging.

  1. First open up your project and open the solution explorer.
  2. Right-click on your project node and navigate to "Properties".
  3. Find the "Web" tab on the left-hand side.
  4. Under the "Servers" section select "Use Local IIS Web Server".
  5. This next step varies by how you have your project set up.
    • If you have your project mapped to IIS already then simply put the local URL in the "Project Url" field.
    • If you have NOT mapped your project to IIS yet then it is usually more convenient to click the "Create Virtual Directory" button and let it do it for you. (If you have not set up IIS on your machine correctly then this will fail) Note: Keep in mind that this is not the same as creating a new website in IIS. It creates a virtual directory under the default website that comes with IIS. This can cause problems if you were bad and you used application relative paths instead of absolute paths as root relative paths refer to the website root, not the virtual directory root. Learn how to make your web project build absolute paths based on an application relative root path using the tilde (~).

You're basically done, but another option I like to set on this page is "Don't open a page. Wait for request from an external application." I set this because I don't like closing a million browser tabs for every time I debug. I usually just leave my browser open behind visual studio and when I debug I prefer to just switch to the browser and refresh rather than have Visual Studio open a new tab.

Best ASP.NET Hosting Recommendation

ASPHostPortal.com provides its 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. ASPHostPortal.com offers ASP.NET hosting starts from $1/month only. They also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable ASP.NET Hosting, ASPHostPortal.com should be your best choice.





ASP.NET Hosting - ASPHostPortal.com :: How to Add and Edit Data In ASP.NET Web Pages

clock February 16, 2015 06:13 by author Dan

Really, I'll take a gander at including information first. To add another book to the database, we have to give a title, ISBN number, depiction and we have to include a writer and classification. The book will gain a BookId esteem consequently as a consequence of making the BookId field in the database an Identity segment. The initial 3 qualities require textboxes inside a structure:

<form action="" method="post">
<div class="row">
    <span class="label"><label for="title">Title:</label></span>
    <input type="text" name="title" id="title" size="50" />
</div>
<div class="row">
    <span class="label"><label for="isbn">ISBN:</label></span>
    <input type="text" name="isbn" id="isbn" size="20" />
</div>
<div class="row">
    <span class="label"><label for="description">Description:</label></span>
    <textarea cols="50" rows="8" name="description" id="description"></textarea>
</div>


Things are progressing pretty well. The creator and classification are not all that direct. A determination of writers and classifications as of now exist in the database in their own different tables. The main piece of tthe writer or classification record that is put away in the book record is the Primary Key quality for the writer or class, as a Foreign Key worth. This relates the suitable writer or classification record the book record. In this way, when adding a writer to a book, for instance, everything we need is the ID of the writer. Notwithstanding, introducing a rundown of ID qualities to the client is very little utilize. How are they going to know which Id fits in with which creator? The answer is to utilize a html <select> component, likewise referred to in ASP.NET circles as a dropdown list. A select component contains one or more <option> components.


Every choice has a quality ascribe (which is utilized to hold the ID), and it incorporates some content which characterizes the choices accessible to the client in an all the more cordial way. On account of creators, a mix of first name and last name will likely be the most supportive approach to do this. Thus, in the code zone at the highest point of the page, we have to characterize a Database item, and after that question it for the information for the select rundown:

var db = Database.Open("Books");
var authors = db.Query("SELECT AuthorId, FirstName + ' ' + LastName AS AuthorName FROM Authors");


While the SQL looks somewhat occupied, it just returns two qualities - the AuthorId for each one creator, and the first name and last name linked with a space between, and conveyed under the pseudonym "AuthorName". The thing to do next is to apply these to the select rundown

<div class="row">
    <span class="label"><label for="authorId">Author:</label></span>
    <select name="authorId" id="authorId">
        <option value="">-- Select Author --</option>
    @{
        foreach(var author in authors){
             <option value="@author.AuthorId">@author.AuthorName</option>

        }
    }
    </select>
</div>


The primary alternative is the default one, and is given no quality whatsoever. After that, every alternative tag is given the ID having a place with the matching creator in the rundown. At the point when the structure is submitted, just the ID quality is posted back (which is all we are after). The same procedure is emulated for applying a select rundown of classifications:

<div class="row">
    <span class="label"><label for="categoryId">Category:</label></span>
    <select name="categoryId" id="categoryId">
        <option value="">-- Select Category --</option>
    @{
        foreach(var category in categories){


             <option value="@category.CategoryId">@category.Category</option>   
        }
    }
    </select>
</div>


Finally the form is finished off:

<div class="row">
    <span class="label">&nbsp;</span>
    <input type="submit" name="action" id="action" value="Add" />
</div>
</form>


At the point when the structure is posted back, the qualities entered by the client are assembled and embedded into the database:

if (IsPost){
  var sql = "INSERT INTO Books (Title, ISBN, Description, AuthorId, CategoryId) VALUES (@0, @1, @2, @3, @4)";
  db.Execute(sql, Request["title"], Request["isbn"], Request["description"], Request["authorId"], Request["categoryId"]);
}


Notice the qualities @0, @1 and so forth in the SQL? They are parameter placeholders, and protet against SQL infusion, which is an endeavor to pass vindictive code to the database. At the point when the Database.Execute() strategy is called, the SQL is passed in initially, emulated by the wellspring of the parameter values. For this situation, the greater part of the qualities originate from the Request.Form gathering (despite the fact that the shorthand form Request[index] is utilized. Things are referenced by their list, which is the name of the structure field. The qualities are passed into the strategy in the same request that their parameters show up in the SQL.

Altering a current book requires a just about indistinguishable structure. Be that as it may, the structure needs to know which book is being altered. This point of interest is passed in the URL to the EditBook.cshtml page. Connections are made in the posting page (Default.cshtml):

foreach(var push in db.Query(sql, Request["CategoryID"])){

foreach(var row in db.Query(sql, Request["CategoryID"])){
    <h2>@row.Title</h2>
    <p><strong>Author:</strong> @row.FirstName @row.LastName<br />
    <strong>ISBN:</strong> @row.ISBN <br/>
    <strong>Description:</strong> @row.Description <br />
    <strong>Category: </strong> @row.Category</p>
    <a href="@Href("~/EditBook", row.BookId)">Edit</a>
}


The last line of code demonstrates the Href() assistant being utilized to connection to EditBook.cshtml utilizing steering, so the record postfix is not required, and the Id of the book is attached like this: EditBook/5, or EditBook/7 and so on. This worth is drawn from the URL utilizing the UrlData() assistant and utilized as a parameter for the SQL that gets the pointed out book's points of interest, alongside the information for the writers and classifications drop down records:

var db = Database.Open("Books");
var Id = UrlData[0].AsInt();
var sql = "SELECT Title, ISBN, Description, AuthorId, CategoryId FROM Books WHERE BookId = @0";
var book = db.QuerySingle(sql, Id);
var categories = db.Query("SELECT CategoryId, Category FROM Categories");
var authors = db.Query("SELECT AuthorId, FirstName + ' ' + LastName AS AuthorName FROM Authors");


The structure itself presents the book to be altered:

<form action="" method="post">
<div class="row">
    <span class="label"><label for="title">Title:</label></span>
    <input type="text" name="title" id="title" value="@book.Title" size="50" />
</div>
<div class="row">
    <span class="label"><label for="isbn">ISBN:</label></span>
    <input type="text" name="isbn" id="isbn" value="@book.ISBN" size="20" />
</div>
<div class="row">
    <span class="label"><label for="description">Description:</label></span>
    <textarea cols="50" rows="8" name="description" id="description">@book.Description</textarea>
</div>
<div class="row">
    <span class="label"><label for="authorId">Author:</label></span>
    <select name="authorId" id="authorId">
    @{
        foreach(var author in authors){
            if(author.AuthorId == book.AuthorId){
                <option value="@author.AuthorId" selected="selected">@author.AuthorName</option>
            } else {
                <option value="@author.AuthorId">@author.AuthorName</option>
            }
        }
    }
    </select>
</div>
<div class="row">
    <span class="label"><label for="categoryId">Category:</label></span>
    <select name="categoryId" id="categoryId">
    @{
        foreach(var category in categories){
            if(category.CategoryId == book.CategoryId){
                <option value="@category.CategoryId" selected="selected">@category.Category</option>
            } else {
                <option value="@category.CategoryId">@category.Category</option>
            }       
        }
    }
    </select>
</div>
<div class="row">
    <span class="label">&nbsp;</span>
    <input type="submit" name="action" id="action" value="Edit" />
</div>



</form>


Inside the code for both the writer and classification dropdowns, the Id of the book to be altered is contrasted and every Id of the writer or class, and if there is a match, selected="selected" is added as a credit to the alternative. When WebMatrix is discharged completely, there may be aides for drop down records, yet this is more or less great Beta 1. Presently we have a structure that gets the chose book and presentations it for altering, yet nothing happens if the client clicks submit. The code square needs to be changed at the highest point of the record to overhaul the chose book with the new values, and after that redisplay it, so it now resembles this:

var db = Database.Open("Books");
var Id = UrlData[0].AsInt();
var sql = "";
if (IsPost)
{
  sql = "UPDATE Books SET Title = @0, ISBN = @1, Description = @2, AuthorId = @3, CategoryId = @4 WHERE BookId = @5";
  db.Execute(sql, Request["title"], Request["isbn"], Request["description"], Request["authorId"], Request["categoryId"], Id);
}
sql = "SELECT Title, ISBN, Description, AuthorId, CategoryId FROM Books WHERE BookId = @0";
var book = db.QuerySingle(sql, Id);
var categories = db.Query("SELECT CategoryId, Category FROM Categories");
var authors = db.Query("SELECT AuthorId, FirstName + ' ' + LastName AS AuthorName FROM Authors");


Another code test has been connected if the page IsPost(), and in that, the qualities are gotten from the Request accumulation and passed into the SQL to upgrade the database. At that point the code proceeds as in the recent past, recovering the chose book for redisplay with the redesigns.

Best ASP.NET Hosting Recommendation

ASPHostPortal.com provides its 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. ASPHostPortal.com offers ASP.NET hosting starts from $1/month only. They also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable ASP.NET Hosting, ASPHostPortal.com should be your best choice.



ASP.NET Hosting - ASPHostPortal.com :: Key Points of ASP.NET VNext

clock February 12, 2015 05:58 by author Mark

Microsoft openness and open source approach leads to ASP.NET vNext – The next generation of .NET. In this article we will discuss some of key points of vNext.
In vNext we have cloud optimization mode. Traditional scenario, we are having entire .NET Framework and CLR install to design and deploy ASP.NET application.
According to me Microsoft had spilt the framework and CLR in vNext as .NET Core and everything else. In the .NET Core we have cloud optimized runtime core with very minimum foot prints. Everything else can be very easily downloaded using Nuget repository. This is actually made compiler as service (CaaS) scenario.

(kpm restore – To compile and download required libraries from nuget.)
We would be having only minimum footprint and essential libraries to run the ASP.NET application. A minimum footprint delivers faster results. During compile time only essentials components are deployed application wise, each application can have different version of .NET vNext side by side.

(kvm list - to see what versions of the ASP.NET vNext are available.)
Dependency injection is design pattern used to manage orchestration between loosely coupled objects. Build in DI in ASP.NET vNext manages configuring services and libraries. Environment specific service / libraries can configure through DI. This is very useful methodology while working with cross platform development and deployment.
ASP.NET MVC and Web API have been unified into a single programming model. The new framework removes a lot of overlap between the existing MVC and Web API frameworks. It uses a common set of abstractions for routing, action selection, filters and model binding.
The Roslyn provides open-source C# and Visual Basic compilers with rich code analysis APIs. It enables building code analysis tools with the same APIs that are used by Visual Studio. (more details on Roslyn compiler in next article)
The .NET Foundation is an independent organization to foster open development and collaboration around the growing collection of open source technologies for .NET. We can find more details at this link.

Summary

  • Cloud and server-optimization.
  • NuGet everything - even the runtime itself.
  • Side by side - deploy the runtime and framework with your application.
  • ASP.NET MVC and Web API have been unified into a single programming model.
  • Dependency injection out of the box.
  • New flexible and cross-platform runtime.
  • All Open Source via the .NET Foundation and takes contributions.
  • Roslyn compiler.

TOP No#1 Recommended ASP.NET Hosting

ASPHostPortal.com

ASPHostPortal.com  is the leading provider of Windows hosting and affordable ASP.NET Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability.



ASPHostPortal.com Announces Powerful Sitefinity 7.3 Hosting Solution

clock February 10, 2015 18:56 by author Dan

As a technology focused web host, ASPHostPortal are designed to support popular web development technologies. Windows and ASP.NET hosting are at the core of its business practice. They have over 10 years combined experience in .NET, PHP, Network Administration, System Integration and related technologies to support mission critical hosting for applications built on these platforms. Today, they launch Sitefinity 7.3 hosting with powerful network and affordable price.

Sitefinity by Telerik is an ASP.NET web content management platform engineered to make managing your website a more positive, empowering and usable experience. Sitefinity is the first and only CMS to enable enterprises to take full advantage of all three mobile development strategies— Responsive Web Design, mobile websites, and mobile apps, easily and effectively—and all from one CMS user interface.

Sitefinity 7.3 introduces lead scoring, integration with SharePoint Online, extended ASP .NET MVC support and more.

Directly Impact Revenue With Lead Scoring
Manage your lead scoring criteria according to various data points collected across channels.

Complement SharePoint Online
Provide a natural extension to all your SharePoint workflows and wrap a compelling presentation around your core business documents.

Build fast, and light with new ASP .NET MVC Features
MVC based widgets for each of your dynamic modules with automatically generated Razor templates.

With 7 data centers that located in USA Europe, Australia and Asia, ASPHostPortal is superior provider in the hosting market. They provides Sitefinity 7.3 Hosting only from $5/month with 30 days money back guarantee. In addition, ASPHostPortal has been awarded as one of the best hosting companies in the industry because of the good hosting performance this web host provides. To provide best hosting performance, this company always maintains the server with expert team in ASP.NET Technology. To learn more about Sitefinity 7.3 Hosting, please visit http://asphostportal.com/Sitefinity-7-3-Hosting

About ASPHostPortal.com :
ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET Hosting. ASPHostPortal.com has ability to support the latest Microsoft and ASP.NET technology, such as: such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch. ASPHostPortal include shared hosting, reseller hosting, and sharepoint hosting, with speciality in ASP.NET, SQL Server, and architecting highly scalable solutions. ASPHostPortal.com strives to supply probably the most technologically advanced hosting solutions available to all consumers the world over. Protection, trustworthiness, and performance are on the core of hosting operations to make certain every website and software hosted is so secured and performs at the best possible level.



ASP.NET 5 Hosting - ASPHostPortal.com :: Debugging jQuery in ASP.NET

clock February 10, 2015 07:17 by author Mark

When an ASP.NET developer uses jQuery or JavaScript (clientside programming) in his code, the question always arises of how to debug this code. We can debug in code behind with breakpoints. But what for clientside scripting. Some people say use "alert()", but I don't think this is a sufficient way to do it.
So the good news is that we have the "debugger" keyword to debug your line of code.
Use debugger before your code, where you want to start debugging.
See the following code:

<html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <script src="Scripts/jquery-1.7.1.min.js"></script>
        <script>
            $(document).ready(function () {
                $(':radio').click(function () {
                    debugger;
    //Get the value of Radio button
                    var _GetVal = $(this).attr('value');
                });
             });
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
           First
            <input type="radio" name="rd1" value="10" />
            <input type="radio" name="rd1" value="11" />
            Second
            <input type="radio" name="rd1" value="12" />
            <input type="radio" name="rd1" value="13" />
        </div>
        </form>
    </body>
    </html>

This is a simple ASP.NET in page code. When the user clicks a radio button, debugging will automatically start, due to the debugger command. In the above program, when the user clicks on the radio button we stored its value in the _Getval variable.

$(document).ready(function () {
                $(':radio').click(function () {
                    debugger;
    //Get the value of Radio button
                    var _GetVal = $(this).attr('value');
                });
             });

You can see that when I declare a _GetVal variable, before I use "debugger" because from here I want to start debugging. See the following images.
Figure 1: When user clicks in the radio

Figure 2: When the user presses F10 (the same way as what we did in code behind using a breakpoint).

In the image above you can see that the _GetVal value is 10 now. So with the use of the debugger you can start your debugging in ASP.NET.
And please remember, when you finish debugging or publish your page, please remove debugger from your code.
If you have any query, Please send your valuable Comments. Happy Programming

TOP No#1 Recommended ASP.NET Hosting

ASPHostPortal.com

ASPHostPortal.com  is the leading provider of Windows hosting and affordable ASP.NET Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability.



ASP.NET Hosting - ASPHostPortal :: Step by step instructions to disable Session state on your ASP.NET page

clock February 9, 2015 06:43 by author Dan

Each ASP.NET page has the session state of course, this may diminish the aggregate execution a tad bit. So You can incapacitate the session state from the pages when you don't have to utilize sessions. What's more you can do as such to set the false estimation of the EnableSessionState characteristic in the page mandate of your page like as:

<%@ page EnableSessionState="False" %>

Full deceleration:

<%@ Page Title="Home Page" Language="C#" EnableSessionState="False"
AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

Essentially EnableSessionState can have three qualities: False, ReadOnly and True. Assume on the off chance that you need to peruse the qualities from the session at exactly that point you can set the ReadOnly to the EnableSessionState characteristic.
Also Now on the off chance that you need to handicap Session state on whole site then you can change your site's web.config document by simply including after lines

<configuration>

    <system.web>
        <sessionState mode="Off">
        </sessionState>
        </system.web>
    </configuration>


When you set the handicap session state from the web.config, after that you can utilize the EnableSessionState="True" in any page of your site.

Best ASP.NET Hosting Recommendation

ASPHostPortal.com provides its 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. ASPHostPortal.com offers ASP.NET hosting starts from $1/month only. They also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable ASP.NET Hosting, ASPHostPortal.com should be your best choice.



ASP.NET Hosting - ASPHostPortal :: Automatically Clean Up Temporary ASP.NET Files

clock February 6, 2015 06:24 by author Dan

The Problem

One of the test situations I help keep up is subject to dynamic and general changes in .NET applications. The improvement group are always discharging new forms that are marginally distinctive.

You may not be mindful that .NET applications experience an assemblage process when they first start up. I've additionally been told on application pool reuse anyway I haven't affirmed this. Then again, after the application has been evacuated or overhauled, the arrangement interim records remain. On a test situation like my above situation, an aggregate of 50gb of circle space can be effortlessly squandered, doing nothing. So in case you're in a comparable situation, you may need to routinely clean up these records.

I know of four areas where these records can develop:

  • C:\Windows\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files
  • C:\Windows\Microsoft.NET\Framework64\v1.1.4322\Temporary ASP.NET Files
  • C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
  • C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files
  • C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files
  • C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files

On the off chance that you application pools run in 64bit mode, you'll discover the "Framework64″ areas more appropriate. In the event that your application pools utilize 32bit mode, you'll have to consider the "Structure" areas.

The following is an illustration of a creation domain utilizing almost 13gb:

Powershell Script to Automatically Delete Temp Files

As framework directors, we have to robotize and script our workload so we can concentrate on the vital stuff! So we formulated a basic execution of Powershell script which deals with this clean up issue in one line:

Get-Childitem "C:\windows\microsoft.net\framework*\v*\temporary Asp.net Files" -Recurse | Remove-Item -Recurse

In case you're perusing this and considering, EWWWW Powershell. Don't deride it until you attempt this single line summon.

I spared the above charge into a record names Cleanupaspnettempfiles.ps1 and spared it to D:\tools\. Name and recovery yours as you see fit.

To relax, you can plan this script with a planned assignment. You can click on these screenshots in the event that you require more detail:

(I picked to run on the first Saturday of the month. Utilize your own inclination.)

(My powershell.exe was at %systemroot%\system32\windowspowershell\v1.0\powershell.exe)

(Note you have to tick the choice box to get to the following screenshot or burden the properties on the recently made undertaking.)

Execution Policy Errors

In case you're being advised to sign your recently made script, you can either do that for high security situations or you can turn off the marking prerequisite. It's extraordinary to have this choice incorporate with the dialect yet in the commonplace environment I've discovered it a trouble.

In a Powershell summon window, sort the accompanying to check your current Executionpolicy:

Get-Executionpolicy

You can transform it to Unrestricted by writing:

Set-Executionpolicy Unrestricted

A Few Notes

An update that records in these areas are typical. Don't go over the top attempting to clean them up.

It ought to be noted that while the records are being used by the web server, you won't have the capacity to erase them – this is fine; the objective is to clean up unused documents.

You ought to additionally be mindful whenever the application wakes up, on application pool begin, the application will re-gather once more. This may prompt a more drawn out than normal starting page load. On the off chance that this is of concern, consider just uprooting records that are more seasoned than 30 days.

Obviously, this script is given as may be. You ought to test it completely in a test situation before utilization underway (however I surely do).

Best ASP.NET Hosting Recommendation

ASPHostPortal.com provides its 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. ASPHostPortal.com offers ASP.NET hosting starts from $1/month only. They also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable ASP.NET Hosting, ASPHostPortal.com should be your best choice.



Cheap ASP.NET 4.5 Hosting

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

 photo ahp banner aspnet-01_zps87l92lcl.png

 

Corporate Address (Location)

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

Tag cloud

Sign in