Using WSE 3 in Visual Studio 2008

Web Service Enhancements 3 (WSE 3) is not officially supported for Visual Studio 2008. The reason is that Microsoft wants you migrate your code to WCF. Believe me, it’s not easy to convert a client application using WSE 3 to WCF.

So, how do you make WSE 3 work with Visual Studio 2008? Here are the steps.

Go to the folder %ALLUSERPROFILE%\Application Data\Microsoft\MSEnvShared\Addins (C:\Documents and Settings\All Users\Application Data\Microsoft\MSEnvShared\Addins).

Open the file WSESettingsVS3.AddIn in notepad. You’ll have this file if WSE 3 is installed. You’ll find two <HostApplication> sections. Note that the version is 8.0. Copy and paste these two sections and change the version of the new sections to 9.0. After the changes are made, the file should look something like this:

<?xml version="1.0" encoding="utf-16" standalone="no"?>
<Extensibility
xmlns="http://schemas.microsoft.com/AutomationExtensibility">
  <HostApplication>
    <Name>Microsoft Visual Studio Macros</Name>
    <Version>8.0</Version>
  </HostApplication>
  <HostApplication>
    <Name>Microsoft Visual Studio</Name>
    <Version>8.0</Version>
  </HostApplication>
 <HostApplication>
  <Name>Microsoft Visual Studio Macros</Name>
  <Version>9.0</Version>
 </HostApplication>
 <HostApplication>
  <Name>Microsoft Visual Studio</Name>
  <Version>9.0</Version>
 </HostApplication>

  <Addin>
    <FriendlyName>WSE Settings 3.0...</FriendlyName>
    <Description>WSE Settings Tool.</Description>
    <Assembly>C:\Program Files\Microsoft WSE\v3.0\Tools\WseSettingsVS3.dll</Assembly>
    <FullClassName>WseSettings.Connect</FullClassName>
    <LoadBehavior>1</LoadBehavior>
    <CommandPreload>0</CommandPreload>
    <CommandLineSafe>0</CommandLineSafe>
  </Addin>
</Extensibility>

Save the file. This should be enough to add the add-in to Visual Studio 2008.

Now, open the devenv.exe.config file. You can find this file in the same folder where your visual studio application resides. Add the following snippet just above the closing </configuration> tag inside the file. This helps Visual Studio to generate web service proxy classes using WSE.

<system.web> 
    <webServices>
        <soapExtensionImporterTypes>
            <add type="Microsoft.Web.Services3.Description.WseExtensionImporter,
               Microsoft.Web.Services3, Version=3.0.0.0,
               Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        </soapExtensionImporterTypes>
    </webServices>
</system.web>


Close all the instances of Visual Studio 2008 and start the application again.

Enable HTTP Compression on IIS for ASP.Net

If you enable HTTP compression on IIS, it does not enable compression for aspx files by default. You will have to edit the metabase or run the following commands and they will do it for you.

Important step: Make a backup of the file %windir%\System32\inetsrv\MetaBase.xml. If something goes wrong, then copy the original file back and restart the iis server.

Open a command prompt (cmd) and CD to the directory \Inetpub\AdminScripts.

Execute the following commands one at a time and verify that there are no errors.

net stop iisadmin

cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoDynamicCompression true

cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoStaticCompression true

cscript.exe adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcFileExtensions “htm” “html” “txt” “ppt” “xls” “xml” “pdf” “xslt” “doc” “xsl” “htc” “js” “css”

cscript.exe adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcFileExtensions “htm” “html” “txt” “ppt” “xls” “xml” “pdf” “xslt” “doc” “xsl” “htc” “js” “css”

cscript.exe adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcScriptFileExtensions “asp” “dll” “exe” “aspx” “asmx” “ashx”

cscript.exe adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcScriptFileExtensions “asp” “dll” “exe” “aspx” “asmx” “ashx”

net start w3svc

Done.

One of our web pages was about 3MB size and after compressing it, the page is only 170KB. That was about 30s improvement in page load time.

600,000 miles and counting.

Mac OS X 10.5.7 update

Mac OS X 10.5.7 update

Perfect Scrambled Eggs

This recipe serves 2 hungry people.

6 large eggs
6 tablespoons low-fat milk
1 Tablespoon butter

Salt and pepper


Heat a large non-stick frying pan to a setting below medium.

Do not whisk or blend the eggs. Just pour the eggs with yolk intact into the pan. Do not add salt yet.

Break the yolk and stir fast. Add the butter and let it melt. Once the egg is really blended, stop stirring.

Stop stirring until the first hint of setting begins. Using a spatula or a flat wooden spoon, push eggs toward center while tilting skillet to distribute runny parts.

Continue this motion as the eggs continue to set. When the push-to-center technique is no longer cooking runny parts of the egg, flip over all the eggs. Allow the eggs to cook half a minute longer. Remove the pan from the stove and transfer eggs to serving plates. Add salt and pepper to taste.

DC Talk - Colored People (via forefrontrecords)

Dropped Cameras

Adit
Nikon F3, Nikkor 50mm f/1.2, Kodak Ektachrome 200 E200

Adit

Nikon F3, Nikkor 50mm f/1.2, Kodak Ektachrome 200 E200

Aman
Nikon F3HP, Nikkor 55mm f/2.8 Micro, Kodak Ektachrome E200

Aman

Nikon F3HP, Nikkor 55mm f/2.8 Micro, Kodak Ektachrome E200

New theme

Updated the theme of the site to a built-in theme of tumblr.

Current swine flu map.

Current swine flu map.

Why text messages are limited to 160 characters | Technology | Los Angeles Times

7 Signs That Your Job Could Be in Jeopardy

Art student&#8217;s car vanishing act

Art student’s car vanishing act

CDC TV - H1N1 (Swine Flu)