Wednesday, August 19, 2009

Enabling Gzip compression in IIS 6.0 for ASP.NET websites


Server performance tip , using gzip compression can decrease the number of bytes sent by your server. This gives the perception of faster pages and also cuts down on bandwidth usage. Depending on the data sent, how well it can be compressed, and whether the client browsers support it (IIS will only send gzip compressed content to clients that support gzip compression, such as Internet Explorer 6.0 and Firefox), your server can serve more requests per second. In fact, just about any time you can decrease the amount of data returned, you will increase requests per second.


Step 1:


Expand IIS Manager. Right click on Websites. Click Properties. Click the Service tab. Check the boxes to enable compression,You can give where the temp files can get stored there and the size that is allowed




Install IIS 6.0 Resource Kit Tools download from MSDN .



Open the IIS Metabase Explorer. It is part of the resource kit you just installed. Expand LM>W3SVC>Filters>Compression. You will need to edit both gzip and deflate. Find the item with the name HcScriptFileExtensions. Add the values aspx, axd, asmx, js  and css . Repeat process for gzip and deflate. Find HcDynamicCompressionLevel and set it to something higher than 0.

Never try to gzip audio,Video and jpg files which are already compressed, For jpg and other images use smush it tool


Tuesday, August 18, 2009

Configuring CrusControl


Hi Guys,

Most of the build process in general is automated , generally people use so many tool, one among them is CC(CrusControl) , I used this CrusControl to make my build job easy, its really good. i know that all the functionalities here i mentioned we can achieve through normal C# code itself. But this like they have done we just need to configure :).

K let start Following functionalities

1. Triggering Build at certain time , Scheduling build

2. Getting latest from Vss , To fresh folder and applying Lable once the latest is done.{if the Vss get latest is not working make sure the CrusControl service is running with windows account goto Logon option and change it }

3.Build the solution using devenv.exe

4. Executing EXEs using Crouscontrol

5.Generating FxCop Report

6.Send the result to team


<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
<!-- START - Block for MFW V2 - added by Ashwani-->
  <project name="Messaging framework v2">
      <filterTrigger startTime="13:00" endTime="06:00">
        <trigger type="filterTrigger" startTime="0:00" endTime="23:59:59">
          <trigger type="intervalTrigger" name="continuous" seconds="900" buildCondition="ForceBuild"/>
        <!--  <weekDays>
      <scheduleTrigger time="16:00" buildCondition="ForceBuild" name="Scheduled">
      <scheduleTrigger time="13:00" buildCondition="ForceBuild" name="Scheduled">


     <sourcecontrol type="multi">
             <project>"$/AceRoot/Development/ACE Messaging Framework V2/ReleaseToQA"</project>
            <executable>C:\Program Files (x86)\Microsoft Visual SourceSafe\SS.EXE</executable>
            <timeout units="minutes">40</timeout>
            <project>"$/AceRoot/Development/ACE Messaging Framework V2/Source Projects V2"</project>
            <executable>C:\Program Files (x86)\Microsoft Visual SourceSafe\SS.EXE</executable>
            <workingDirectory>D:\MFWv2\Source Projects V2\</workingDirectory>
            <timeout units="minutes">40</timeout>

      <!-- Start Build Source Code Projects -->
      <!-- Listener solution Build-->
        <solutionfile>"D:\MFWv2\Source Projects V2\ACE MFW V2.sln"</solutionfile>
        <executable>C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe</executable>
      <!-- Website solution Build-->
        <solutionfile>"D:\MFWv2\Source Projects V2\MFWSetups\MFWSetups.sln"</solutionfile>
        <executable>C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe</executable>
      <!-- Start execution of FxCop -->
        <executable>C:\Program Files (x86)\Microsoft FxCop 1.36\FxCopCmd.exe</executable>
        <baseDirectory>C:\Program Files (x86)\Microsoft FxCop 1.36\</baseDirectory>
        <buildArgs>/p:"D:\MFWv2\Source Projects V2\FxCOP\MFW V2.FxCop"  /out:"D:\MFWv2\Source Projects V2\FxCop-results.xml" /gac</buildArgs>
      <!-- Complete execution of FxCop -->


          <!-- Start FxCOP result -->
          <file>D:\MFWv2\Source Projects V2\FxCop-results.xml</file>
          <!-- Complete FxCOP result -->
          <!-- Start MStest result-->
         <!-- <file>D:\TestProjects.trx</file>-->
          <!-- End MStest result-->

      <email from='' mailhost='' includeDetails='true'>
          <user name='MFW' group='ACE' address=''/>
          <group name='XXXX' notification='always'/>
      <xmllogger />

<!-- END - Block for MFW V2 - added by Venky-->

Monday, August 17, 2009

Get the Screen size using JavaScript


xmlns="" >
<head runat="server">
    <script language="javascript" type="text/javascript">
        function showScreenData() {
            document.getElementById("lblScreenDetails").innerText =
           "Total Height: " + screen.height
           +" Total Width: " + screen.width
           +" Available Height: " + screen.availHeight
           +" Available Width: " + screen.availWidth
           +" Available Pixel Depth : " + screen.pixelDepth
           +" Available Color Depth : " + screen.colorDepth
           +" Buffer Depth : " + screen.bufferDepth;
            return false;
    <form id="form1" runat="server">
    <asp:Button ID="btnScreenData" runat="server" Text="Get Screen Details" OnClientClick="return showScreenData()" />
    <br />
    <asp:Label ID="lblScreenDetails" runat="server" Text="Label"></asp:Label>