Wireless network problem in WS2008

If you are using WS2008 with your wireless network card or you are using WS2008 on a laptop, you might face a problem that after installing properly the driver of the wireless device WS2008 still couldn’t find any wireless networks. This is not a bug but a simple issue i.e by default WS2008 doesn’t install the wireless LAN service so you have to install it manually to make your wireless card running. At first i also got a bit frustrated as to why my wireless network is not working but soon i found out this solution, it was not so direct so i thought to share the solution with you all so that others having the same problem might feel easy to configure it. Just go to the features section in the server manager and click on “Add Feature” then select “Wireless LAN Service” After installing the wireless LAN Service your wireless device would start finding the networks.   Happy Programming !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory.

If you are using IIS 7 then you probably might face this error.It’s a little frustrating when such errors occur and simple IIS 6 or IIS 5.1 users when it was really simple to configure and run a website, those users feel really hooked up. I myself faced a lot of issues but as you progress with IIS 7 you will find it simple to configure and very easy to manage. As far as this issue is concerned in the earlier versions of IIS we used to just set the directory browsing checkbox to be checked in order to enable directory browsing on the virtual directory or the website, its really simple in IIS 7 also just click the directory browsing option in the configuration section and on the right side of the directory browsing view you will find enable by default directory browsing is disabled.It will be more clear from the below image. This will solve your Directory Browsing issue for IIS 7.Stay tuned for more on IIS 7 tips and tricks series. Happy Programming !!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Error 1 The “Validatexaml” task failed unexpectedly.System.IO.FileLoadException.Could not load file or assembly.

If you are facing the ValidateXaml exception and your build fails then it might be due to the new feature of blocking the downloaded content. This means whenever you download a project from the internet it is quite likely that windows will automatically block its content for few dll’s and if it’s so you will get this error. So the easy solution is to look for the file for which its complaining as in the above solution its the Activity control for which it’s complaining, so just navigate to that file right click on the file and press unblock and that’s it , go  and rebuild your solution and everything will work as desired. I have myself faced this problem in Windows Server 2008 and Windows 7. You might try this also in Windows Vista as well.Hope this helps. Happy programming !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Asp.net & IIS Tricks:- Using GZip Compression with IIS 6.0 to compress your dynamic content such as your aspx pages and increase the client side experience by downloading the pages fast.


In this article i will discuss how to enable gzip compression for the dynamic content.After following these steps you can enable compression for your aspx pages and other dynamic content. But you have to be careful while compressing the dynamic content.I would suggest you to use the dynamic compression only when although you are using asp.net but most of your webpages are more likely to be static with only few of them changing now and then. This is due to the  reason that compression brings in overhead on the server CPU and memory.So if the content is so much dynamic that it keeps on changing with every request its not at all advisable to use the compression for your dynamic pages. Instead you can use gzip compression for your static pages such as html,css and js files. But if your dynamic content is also near about static then you can use gzip compression provided as a built in feature of windows and IIS 6,by default it is not enabled here in this article we will go through the steps to enable the gzip compression scheme. Enabling this compression can also be useful for developers who are running and testing their websites projects on their dev machines and are frustrated of long loading time of the content of their test websites and web applications.

Case Study

Here the case study consists of one of my recent projects which was a public facing website build up on Telerik's Sitefinity Content Management System. So here in my case as the client was using Sitefinity so my pages were all .aspx pages but they were rather static as we CMS enabled their existing HTML content which was almost static. So i will provide you with the reduction in size without any significant load on the server which was achieved using the gzip compression scheme with IIS Lets analyze the page HTML,CSS,JS before enabling the compression.Below are the images which are self explanatory.


So it is now quite obvious that there is a lot of reduction in the actual page size which will be transferred across the wires. So in specific situations you should enable compression for all the content and in most of the cases at least you should enable the gzip compression for the static content. Enabling the GZip Compression Now let us walkthrough the steps to enable gzip compression within the IIS.

  • To enable gzip compression first open the IIS Manager using "inetmgr"  command at your run command prompt.
  • After opening the IIS Manager navigate to the website properties by right clicking the website node.(Remeber here  all images are shown from Windows Server 2003)
  • Now go to the service tab and inside the http compression section enable compress application files and compress static files both and then click ok.


    After this just navigate to the Web Service Extension section and in this section add a new extension for gzip compression.Just Click Add new Web Service Extension and name the extension as Http Compressor or anything and in the Add section select the file gzip.dll which is inside C:WindowsSystem32Inetsrvgzip.dll and then click OK.

       After adding the web service extension now we have to modify the IIS Metabase.xml file to achieve compression for dynamic pages    such  as aspx pages.
        IIS Metabase.xml file can be found in the directory C:WindowsSystem32InetsrvMetabase.xml
        Make sure to have another copy of this file as it is very important and if anything goes wrong here IIS will crash on your system.So make a backup of this file somewhere in your disk.
        Now open this file in a simple editor either Notepad or Notepad++ and search for the entry called ICompressionScheme.There may be 6 occurrences of this word so one of them is for 'deflate" another one for "gzip" and the last one "Parameters" So choose the section having gzip as given below and add the required extension in the "HcScriptFileExtensions" as shown below we have added aspx.

        Now save this file if your editor says that this file is opened in some other application or some other application is using your file then either stop the IIS service and the word wide web publishing service and then again try it, another method is to edit the metabase.xml file while it is being opened and used by the other applications.
        So for the second scenario we have to make some changes in the IIS properties which are given below

        After enabling the direct metabase edit you can now modify the metabase.xml file without stopping the IIS.After you are done you just have to restart the IIS using "iisreset /noforce"
        Now look for the changes now you should receive compressed content from the server.
        For checking you can use various online websites and tools such as pipeboost. http://www.pipeboost.com

        Also there is a list of websites which can do this in one of my posts     http://localhost/smallworkarounds/index.php/2008/10/10/websites-to-check-whether-your-pages/

    Conclusion User gzip compression over the default deflate compression every time for your all static pages and content leaving some special cases and scenarios. And also try for compression of your dynamic content if it is more of a static type. Getting file reduction upto 70-95% is a lot when we are talking about transferring data on net.   Happy Programming!!!!.... Stay tuned for more on upcoming posts..........

    Websites to check whether your pages are served after compression or not.

    1. http://www.pipeboost.com
    2. http://www.port80software.com/products/httpzip/compresscheck

    These are among the few websites which can check and give you in detail picture of how your webpages are working with and without compression. IIS compression using Gzip is preferred over the default deflate compression as browsers have gzip as their first search string thus pages with gzip loads faster although some people can argue that deflate is faster than gzip. How to enable gzip compression in your static and dynamic pages this we will cover in the next article. Given here are the results tested from port80software.com on compression test of a dummy website. gzip

    Anonymous Types in C#

    1. Anonymous types in C# are a new concept which shipped with .net framework 3.5
    2. Anonymous types are nothing but it simply states that we dont have to define a type and that type is defined automatically by C# analysing the right hand side.
    3. Anonymous Types are very important in the LINQ word.
    4. Keyword var is used to declare an anonymous type.
    5. They are immutable and thus dont require any property getter or setter methods
    6. They must always be initialized so that the compiler can build the type defination and bind the anonymous type with that , and it is only possible only when we have any thing in the right hand side of an anonymous type thus anonymous types should always be initialized.

    //1.Shows Simple anonymous varible declarations and iterating using for loop

     1: var fabonici = new int[]{1,1,2,3,5,8,13,21};
     2: for( var i = 0; i<fabonici.Length; i++)
     3: Console.WriteLine(fabonici[i]);

    //2.Show Simple anonymous variable declarations and iterating using foreach loop

     1: var fabonici = new int[]{1,1,2,3,5,8,13,21};
     2: foreach (var fibo in fabonici)
     3: Console.WriteLine(fibo);

    //3.Linq query used as iterand in foreach statement.

     1: var fabonici = new int[]{1,1,2,3,5,8,13,21};
     2: foreach (var fibo in
     3: from f in fabonici
     4: where f%3 == 0
     5: select f)
     6: Console.WriteLine(fibo);