European Windows 2019 Hosting BLOG

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

European .NET Framework 4.5.1 Hosting - UK :: Update and Feature Overview .Net Framework 4.5.1

clock September 1, 2014 09:21 by author Onit

.NET Framework 4.5.1 was released on 17-10-2013 along visual studio 2013, it’s required windows vista SP2 or later. in this article I will telling you what new in this .Net Framework 4.5.1 Version.

 


So this version of .NET had bunch of good updates some of them are listed below:

  • Update Portable Class Library Templates: Since I had mentioned about visual studio 2013,and this is included updates to the portable class library templates. This will allow you to using Windows Runtime APIs in portable libraries that target windows 8.1, windows phone 8.1 and windows phone Silverlight 8.1. you can also include XAML (Windows.UI.XAML types) in portable libraries, you can create a portable windows runtime component, for use in store apps. And also you can retargeted windows store or windows phone store class library like a portable class library
  • Documentation for .NET Native, is a precompilation technology for building and deploying windows store apps. And .Net native will compiles your apps directly to native code, for a better performance
  • .net Framework Reference Source, you can now browse through the .NET Framework source code online.


New Features and enhancements in the .NET Framework 4.5.1:

  • Automatic binding redirection for assemblies.
  • Collect diagnostics information: this feature is really help the developer to improve the performance of server and cloud application.
  • Explicitly compact the large object heap during garbage collection.
  • Additional performance improvements such as ASP.NET app suspension, multi-core JIT improvements and faster app startup after a .NET Framework updates.


Improvements when debugging your .NET Framework

  • Return Value in the visual Studio Debugger, when you debug a managed app in VS 2013, the autos windows displays return types and values for method this information is available not only for desktop, and windows stro but also in windows phone apps.
  • 64-Bit Edit and Continue support in Visual Studio 2013
  • Inspecting Method return value while debugging using Autos Window as well as a pseudo variable $ReturnValue
  • ADO.NET Connection Resiliency
  • Async Debugging Enhancements : To make it easier to debug asynchronous apps in Visual Studio 2013, the call stack hides the infrastructure code provided by compilers to support asynchronous programming, and also chains in logical parent frames so you can follow logical program execution more clearly
  • Better exception In Windows 8.1, exceptions that arise from Windows Store apps preserve information about the error that caused the exception, even across language boundaries
  • Those are some sort list of what’s new in .NET Framework 4.5.1 you may want to updated your .NET Framework for since they updating much especially in the debugging parts.

 

 



European Reporting Services 2008 Hosting :: How to Troubleshoot The Timeout Error in MS SQL Reporting Services

clock August 18, 2014 06:27 by author Onit

This article will guide you how to solve timeout error in MSSQL Reporting Service. This error happened in SSRS 2008 R2 you may got error such System.Web.HttpException:Maximum request length Exceeded, so in this article I will show you the steps to solved this kind of error.


Well  I’ve found this error while trying to deploy the project:

System.Web.Services.Protocols.SoapException: There was an exception running the extensions specified in the config file. —> System.Web.HttpException: Maximum request length exceeded.    at System.Web.HttpRequest.GetEntireRawContent()    at System.Web.HttpRequest.get_InputStream()    at System.Web.Services.Protocols.SoapServerProtocol.Initialize()    — End of inner exception stack trace —    at System.Web.Services.Protocols.SoapServerProtocol.Initialize()    at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response)    at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)

What makes this error?

This error caused by exist a property MaxRequestLength under the httpRuntime elementin the file web.config (ssrs folder\Reporting Services\ReportServer) its default value is 4096 Kb only 4Mb) it makes reporting services cannot upload a report successfully while the report size is higher than this value.

How to solve this error?

  1. Go to Example-> (C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER*\Reporting Services\ReportServer) (*your SSRS installation folder)
  2. Open web.config file
  3. On that file change the line
    <httpRuntime executionTimeout=”9000″/>
    To
    <httpRuntime executionTimeout=”9000″ maxRequestLength = “16384” />

By default, the property maxRequestLength doesn’t exist in the config file and the default value is 4096 KB so you have to increase that value. In example above I am increasing the value to 16384 KB.



European SQL 2014 Hosting - UK :: How to Join The First Row in SQL

clock August 14, 2014 12:41 by author Onit

To easily making report, we need a list of users and the most recent widget each user has created. We have a users table and a widgets table, and each user has many widgets. users.id is the primary key on users, and widgets.user_id is the corresponding foreign key in widgets.

To solve this problem, we need to join only the first row. There are several ways to do this. Here are a few different techniques and when to use them.

Use Correlated Subqueries when the foreign key is indexed

Correlated subqueries are subqueries that depend on the outer query. It's like a for loop in SQL. The subquery will run once for each row in the outer query:

select * from users join widgets on widgets.id = (
    select id from widgets
    where widgets.user_id = users.id
    order by created_at desc
    limit 1
)

Notice the where widgets.user_id = users.id clause in the subquery. It queries the widgets table once for each user row and selects that user's most recent widget row. It's very efficient if user_id is indexed and there are few users.

Use a Complete Subquery when you don't have indexes

Correlated subqueries break down when the foreign key isn't indexed, because each subquery will require a full table scan.

In that case, we can speed things up by rewriting the query to use a single subquery, only scanning the widgets table once:

select * from users join (
    select distinct on (user_id) * from widgets
    order by user_id, created_at desc
) as most_recent_user_widget
on users.id = most_recent_user_widget.user_id

This new subquery returns a list of the most recent widgets, one for each user. We then join it to the users table to get our list.

We've used Postgres' DISTINCT ON syntax to easily query for only one widget peruser_id.

Use Nested Subqueries if you have an ordered ID column

In our example, the most recent row always has the highest id value. This means that even without DISTINCT ON, we can cheat with our nested subqueries like this:

select * from users join (
    select * from widgets
    where id in (
        select max(id) from widgets group by user_id
    )
) as most_recent_user_widget
on users.id = most_recent_user_widget.user_id

We start by selecting the list of IDs repreenting the most recent widget per user. Then we filter the main widgets table to those IDs. This gets us the same result as DISTINCT ON since sorting by id and created_at happen to be equivalent.

Use Window Functions if you need more control

If your table doesn't have an id column, or you can't depend on its min or max to be the most recent row, use row_number with a window function. It's a little more complicated, but a lot more flexible:

select * from users join (
    select * from (
        select *, row_number() over (
            partition by user_id
            order by created_at desc
        ) as row_num
        from widgets
    ) as ordered_widgets
    where ordered_widgets.row_num = 1
) as most_recent_user_widget
on users.id = most_recent_user_widget.user_id
order by users.id

The interesting part is here:

select *, row_number() over (
    partition by user_id
    order by created_at desc
) as row_num
from widgets
over (partition by user_id order by created_at desc

specifies a sub-table, called a window, per user_id, and sorts those windows by created_at desc.row_number() returns a row's position within its window. Thus the first widget for each user_id will have row_number 1. 

In the outer subquery, we select only the rows with a row_number of 1. With a similar query, you could get the 2nd or 3rd or 10th rows instead.



About HostForLIFE

HostForLIFE is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

We have offered the latest Windows 2019 Hosting, ASP.NET 5 Hosting, ASP.NET MVC 6 Hosting and SQL 2019 Hosting.


Month List

Tag cloud

Sign in