Er. alokpandey's Blog

httpRuntime Element in web.config

Posted in ASP.NET (C# & VB) by Alok Kumar Pandey on January 20, 2012

Configures ASP.NET HTTP runtime settings. This section can be declared at the machine, site, application, and subdirectory levels.

<httpRuntime useFullyQualifiedRedirectUrl="true|false"
             maxRequestLength="size in kbytes"
             executionTimeout="seconds"
             minFreeThreads="number of threads"
             minFreeLocalRequestFreeThreads="number of threads"
             appRequestQueueLimit="number of requests"
             versionHeader="version string"/>

Example

The following example specifies HTTP runtime parameters for an ASP.NET application.

<configuration>
   <system.web>
      <httpRuntime maxRequestLength="4000"
         useFullyQualifiedRedirectUrl="true"
         executionTimeout="45"
         versionHeader="1.1.4128"/>
   </system.web>
</configuration>

References:

http://msdn.microsoft.com/en-us/library/e1f13641(vs.71).aspx

eCommerce platform

Posted in ASP.NET (C# & VB), C#, HTML and XHTML, J-Query by Alok Kumar Pandey on December 16, 2011

A new open source “Flexible and easy eCommerce platform” offers a complete ecommerce solution that allows you to run your fully functional online store in minutes.

AspxCommerce is easy to learn, use and comes enhanced with abundant features for web designers, developers and merchants alike. Merchants can enjoy complete flexibility and control over the look, content and functionality of their online store, AspxCommerce is available on ColePlex
http://aspxcommerce.codeplex.com/

Download AspxCommerce
for features visit demo link http://demo.aspxcommerce.com/
to know much more please visit
http://www.aspxcommerce.com/

Intro

Demo

How to install SageFrame

Posted in ASP.NET (C# & VB) by Alok Kumar Pandey on October 14, 2011

SageFrame is now available for ASP.NET 4.0 also

Posted in ASP.NET (C# & VB), C#, WCF by Alok Kumar Pandey on August 12, 2011
SageFrame is now available for ASP.NET 4.0 also, interested developers 
and site owners now can directly download from CodePlex. 
http://sageframe.codeplex.com/releases/view/70057 
How to install full guide is available 
Installation on Windows XP
 Installation on Windows 7
For details just visit 
http://www.sageframe.com
For the Support just visit
http://www.sageframe.com/Community/Forum.aspx
http://www.sageframe.com/Blog.aspx

SageFrame Full Version Released!!

Posted in Uncategorized by Alok Kumar Pandey on July 17, 2011

SageFrame Full Version Released!!
SageFrame 1.1 full version with new features and explorations. You’ll surely love the way it works.
Download from
http://sageframe.codeplex.com/
For detail visit
http://www.sageframe.com/

Tagged with: ,

Caching helps us to achieve three important aspects of QoS

Posted in Uncategorized by Alok Kumar Pandey on June 22, 2011

Caching helps us to achieve three important aspects of QoS (Quality Of Service):
Performance – Caching improves application performance by minimizing data retrieval and formatting operations.
Scalability – Since caching minimizes data retrieval and formatting operations, it reduces the load on server resources thus increasing the scalability of the application.
Availability – Since the application uses data from a cache, the application will survive failures in other systems and databases.

Windows Phone ‘Mango’ hands-on (updated with longer video!)

Posted in ASP.NET (C# & VB), Windows Mobile 7 by Alok Kumar Pandey on May 29, 2011

On top of the promised 500 new features in Mango, Microsoft brought reps from The Weather Channel and The History Channel to show off Mango-focused features they’re working on in preparation for this fall’s launch.

For more details please visit

http://thisismynext.com/2011/05/24/windows-phone-mango-hands-on/

SageFrame is now on CodePlex #Best Open Source CMS

Posted in Uncategorized by Alok Kumar Pandey on May 25, 2011

SageFrame is now on CodePlex #Best Open Source CMS
http://sageframe.codeplex.com/

Rapid website development
Open and extensible architecture
Full control over HTML code
Highly customizable design
User friendly as well as developer friendly URL management

Difference between Int32.Parse,Convert.Int32

Posted in Uncategorized by Alok Kumar Pandey on May 16, 2011

Int32.Parse Method:
——————-
Converts the string representation of a number to its 32-bit signed integer equivalent.
-When s is a null reference, it will throw ArgumentNullException.
-If s is other than integer value, it will throw FormatException.
-When s represents a number out of range, it will throw OverflowException.

Convert.ToInt32(string):
————————-
Converts the specified string representation of 32-bit signed integer equivalent. This calls in turn Int32.Parse () method.
-When s is a null reference, it will return 0 rather than throw ArgumentNullException.
-If s is other than integer value, it will throw FormatException.
-When s represents a number out of range, it will throw OverflowException.

Int32.TryParse Method:
———————-
Converts the specified string representation of 32-bit signed integer equivalent to out variable, and returns true if it is parsed successfully, false otherwise.
-When s is a null reference, it will return 0.
-If s is other than an integer value, the out variable will have 0.
-When s represents a number out of range, the out variable will have 0.

Parallel Extensions for ASP.NET 4 Apps

Posted in ASP.NET (C# & VB), C#, Windows Mobile 7 by Alok Kumar Pandey on May 11, 2011

ASP.NET applications already get a lot of concurrency for free. The .NET Framework load balances incoming requests among ThreadPool worker threads, striving for optimal use of available CPUs. As long as you minimize blocking in your ASP.NET page code, ASP.NET will process requests concurrently. In most cases, and in particular for Web applications with heavy usage, it is probably not necessary to introduce extra parallelism since adding more work items will only result in competition for CPU time and ultimately reduce request throughput.

Dealing with I/O bound work
If most of the work being done in an ASP.NET request is asynchronous in nature (such as I/O), doing the asynchronous work synchronously can be a huge scalability bottleneck. Solutions based on Asynchronous Programming Model (APM) and Event-based Asynchronous Pattern (EAP) have been recommended to ease this bottleneck. For an in-depth discussion on this refer to Scalable Apps with Asynchronous Programming in ASP.NET and Asynchronous Pages in ASP.NET 2.0. The article Improving ASP.NET Performance also has some good pointers to improving the scalability of your web applications.

New features in the .NET Framework 4 can also be used to make programming asynchronous pages easier. The System.Threading.Tasks.Task class (and the Taskclass that derives from it) can be used to represent asynchronous operations, both classes implement IAsyncResult, and they provide capabilities for coordinating between multiple asynchronous activities. Since part of ASP.NET’s asynchronous pages support is based on the Asynchronous Programming Model (APM) pattern and IAsyncResult, Task can play a role in easing the implementation of asynchronous pages. In particular, Task is most useful if you want to structure your code with continuations, which can be useful if you have multiple stages of asynchronous activity that need to happen before the rest of the page continues execution. For more details, refer to Tasks and the Event-based Asynchronous Pattern and Tasks and the APM Pattern

Dealing with CPU intensive work

If requests are computationally cheap to process, then parallelism is probably an unnecessary overhead.

If the incoming request rate is high, then adding more parallelism will likely yield few benefits and could actually decrease performance, since the incoming rate of work may be high enough to keep the CPUs busy.

If the incoming request rate is low, then the Web application could benefit from parallelism by using the idle CPU cycles to speed up the processing of an individual request. We can use either PLINQ or TPL (either Parallel loops or the Task class) to parallelize the computation over all the processors. Note that by default, however, the PLINQ implementation in .NET 4 will tie-up one ThreadPool worker per processor for the entire execution of the query. As such, it should only be used in Web applications that see few but expensive requests.

If the incoming request rate is variable, i.e. there are long periods when request rate is low (say, at night) and then other periods when request rate is high (say, midday), we need a strategy that will dynamically adjust to the available resources. When the load is high, we don’t want to add to the contention but when the load is low, we want to use the idle resources. For this scenario, we can use TPL’s Parallel or Task constructs since they can adapt to use available resources within a process. If the server is already loaded, the Parallel loops can use as little as one worker and make forward progress. If the server is mostly free, they can grow to use as many workers as the ThreadPool can spare.

Conclusion


ASP.NET already takes advantage multiple processors on your server. Most developers will not need to explicitly add any parallelism into their ASP.NET Web applications. However, if your particular situation requires explicit parallelism, the new parallelism APIs in .NET 4 can be beneficial to you.