Windows Server 2008 Core gets a new role: IIS7 Web Server

At TechEd 2007 here in Orlando, Microsoft announced that it will be adding yet another admin-selectable role option to Server Core: Internet Information Services 7.0 (IIS7), Microsoft’s Web server. “Customers will benefit from an extremely modular, low-footprint Web hosting platform on top of the already small Server Core,” Microsoft said in a press release explaining the addition. “Server Core is ideal for hosting the PHP scripting language and now runs 10 to 20 times faster than before as a result of improvements in IIS.” News of the addition met with applause by some attendees of the morning kick-off keynote here at Microsoft’s IT pro show in Orlando.

from Winbeta

Some articles for dotNET developer from MSDN Magazine

Garbage collection:
Garbage Collection: Automatic Memory Management in the Microsoft .NET Framework – MSDN Magazine, November 2000
Garbage Collection-Part 2: Automatic Memory Management in the Microsoft .NET Framework – MSDN Magazine, December 2000
Garbage Collector Basics and Performance Hints – MSDN

widely spreaded article about tools:
.NET Tools: Ten Must-Have Tools Every Developer Should Download Now – MSDN Magazine, July 2004

wix and msbuild:
WiX Tricks: Automate Releases With MSBuild And Windows Installer XML – MSDN Magazine, March 2007

something new:
CLR Inside Out: .NET Application Extensibility – MSDN Magazine, February 2007
CLR Inside Out: .NET Application Extensibility, Part 2 – MSDN Magazine, March 2007
CLR Inside Out: 9 Reusable Parallel Data Structures and Algorithms – MSDN Magazine, May 2007

Windows update process and .msu patch in Windows Vista

Microsoft KB934307: Description of the Windows Update Stand-alone Installer (Wusa.exe) and of .msu files in Windows Vista.

Conclusion:
The patch file format .msu for Windows Vista is different from .exe patch files applied to previous OS. The .msu are in fact as same as .cab file formats and could be expanded using expand.exe command.
You can use Wusa.exe(Windows Update Stand-alone Installer) to install .msu patch for Windows Vista.
wusa.exe Windows6.0-KB934307-x86.msu

There’s two important parameters available to wusa.exe:
/quiet /norestart

So it’s possible to implement a automatic patch infrastructure targets to Windows Vista client and server now.

get rid of boring "beep" sound

I’ve installed a fresh Vista, but sound card left unwork.
But I hate the boring beep sound.
So execute the commands:
sc stop beep sc config beep start= disabled
if you love it… (who will?)
sc config beep start= auto sc start beep

Solve the 'Unable to Debug: The Binding Handle Is Invalid' problem

If you have disabled service “Terminal Services”, you will get the error as title when you try to start debug in Visual Studio 2005.
Just enable “Terminal Services”, don’t worry, it won’t be a security hole. You can uncheck “enable remote desktop” in “My computer” property window.
or you can try the way below:
`
b.hesse@MSDN forum
I had the same problem, solved it by disabling the “Visual Studio hosting process”
(“Project” -> “[ProjectName] Properties..”. -> “Debug” -> Disable “Enable the Visual Studio hosting process”)

Whats the purpose of this “Visual Studio hosting process” ?
`
Anyway, this is not recommended.

The reason why VS2005 need the “Terminal Services” to debug can be found at the greggm’s msdn blog.
For a short description, the debug function relys on an API call: WTSEnumerateProcess in Wtsapi32.dll which relies on “Terminal Services” as you can guess, to do process listing job.
More eg., if you disabled the service, you can’t see process owner in Task Manager. And this is sth more described in the blog entry by microsoft guy: “The Terminal Services service is enabled by default because in addition to the Remote Desktop functionality, it also provides for Remote Assistance, Fast User Switching, process listing, DCOM support, and probably lots of other stuff that I don’t know about because I don’t work on the TS team.”

So just enable and start the service “Terminal Services” and get out of the strange error. Start your dummy debugging happily!

A trick to IE7Pro plugin: AccuWeather users

If you can’t change location of your AccuWeather plugin for IE7pro “the Ultimate Add-on for Internet Explorer 7”, You can just edit C:\Program Files\IE7Pro\plugins\accuweather\plugin.js,
Change line 78
var mylocation=PRO_getValue("weather_Location","10001");
to
var mylocation=PRO_getValue("weather_Location","ASI|CN|CH002|BEIJING");
You will get weather city code setted to Beijing, China.

You can lookup your city weather code from here, then you may jump to your city’s weather page.
Look at the url! It looks like:http://wwwa.accuweather.com/world-index-forecast.asp?partner=netweather&traveler;=0&locCode;=ASI|CN|CH002|BEIJING
So, locCode=ASI|CN|CH002|BEIJING indicates your city code is ASI|CN|CH002|BEIJING
Just replace the default value 10001 (which means New York) to your locCode value in the file plugin.js
Then open a new windows to see if it works!

Introduce to .ISZ format

All of you know .ISO formats as disk image file, today I’ll introduce you a new compressed .ISZ format.

Features:

  • Compressed format, you can even split into several parts.
  • Open, Burn, Mount on-the-fly as .ISO formats.
  • Password protection

And the specification of .ISZ file format is located here ( plain text ).

Currently, you can use UltraISO to compress ISO to ISZ, decompress ( maybe you don’t need to ), mount, burn…etc, from version 8.51.

Daemon-Tools now supports .ISZ mounting, from version 4.0.9.1.

An example:

I’ve made a VS2005 ISO (Intergrated With SP1), it’s about 4Giga large. After compressed to ISZ, the size reduced to half of previous: 2.1G.

However, the compress ratio depends on your content of image, it’s same as RAR or ZIP, no magic.

Enjoy it!

Lighttpd url-redirect for Wordpress Permlink changes

I changed my wordpress blog entry permlink format. But some link to my blog exists on Internet doesn’t work which results in a HTTP 404 error.

Why redirect is better then rewrite

Someone may have the same question, but take it easy, it depends on your decision.

But rewrite has it’s benefits also, existed link will work without any changes. RSS feed, your live writer(maybe you prefer Word2007? :P) will still work, no need to change the configuration.

I want all visitors include search engine spiders get to know that the permlink changes, that’s why I choose redirect, not rewrite.

Draft conf, simple and ugly

For example, http://feuvan.net/wordpress/?p=107 now should be http://blog.feuvan.net/index.php/2007/03/10/win-ce-platform-builder-60-evalutation-offline-download.html, then I have to configure my lighttpd configure like these.

$HTTP[“url”] =~ “^/wordpress” {
url.redirect =(
“^/wordpress/(.*)$” => “http://blog.feuvan.net/index.php/$1”
)
}
>
>

But some links like http://feuvan.net/wordpress/index.php?p=56 will be redirected to http://blog.feuvan.net/index.php/index.php?p=56, it’s ugly, er……

More clean conf file

So here we have a newer configure file:

$HTTP[“url”] =~ “^/wordpress” {
url.redirect =(
“^/wordpress/index.php?(.)$” => “http://blog.feuvan.net/index.php/$1”,
“^/wordpress/(.
)$” => “http://blog.feuvan.net/index.php/$1”
)
}
>
>

Now the old link will be redirected to http://blog.feuvan.net/index.php/?p=56.

Furthermore

Wait, why not redirect to the new permlink directly?

Maybe I can throw out a solution.

NOTE:

You should enable mod_redirect to make the configuration works for you.

The article is specified to lighttpd 1.4.x series.

New Library Classes in "Orcas"

.NET Framework 3.5 is scheduled to be shipped with “Orcas” later 2007 or early 2008. “Orcas” is the codename of Microsoft’s next generation of the heavy and effective IDE Visual Studio 2007.

According to Microsoft site, the new .NET Framework has been divided into two parts: red bits and green bits. The red bits is backward-compatible 3.0 netFX libraries, while the green bits is totally new assemblies with some extra new features including:

  • A new add-in hosting model, which was discussed in the last two editions of CLR Inside Out
  • Support for the Suite B set of cryptographic algorithms, as specified by the National Security Agency (NSA)
  • Support for big integers
  • A high-performance set collection
  • Support for anonymous and named pipes
  • Improved time zone support
  • Lightweight reader/writer lock classes
  • Better integration with Event Tracing for Windows® (ETW), including ETW provider and ETW trace listener APIs

Suite B Implementations

Suite B standard is from NSA, including these implementations:

  • The Advanced Encryption Standard (AES) with key sizes of 128 and 256 bits for encryption
  • The Secure Hash Algorithm (SHA-256 and SHA-384) for hashing
  • The Elliptic Curve Digital Signature Algorithm (ECDSA) using curves of 256-bit and 384-bit prime moduli for signing
  • Elliptic Curve Diffie-Hellman (ECDH) using curves of 256 and 384-bit prime moduli for key exchange/secret agreement

The new .NET Framework provides these implementations, and also a new class named CngKey:

To support our new CNG-based managed cryptography classes, we’ve added a CngKey class to abstract the storage and usage of CNG keys. CNG keys work similarly to key containers in today’s Crypto API (CAPI)—they allow you to store a key pair or a public key securely and refer to it using a simple string name. You can use CngKey objects when working with the ECDsaCng and ECDiffieHellmanCng classes.
>
> You can also use the CngKey class directly to perform many operations, including opening, creating, deleting, and exporting keys. If we don’t have a managed API for the operation you want, you can get to the underlying key handle to use when calling Win32® APIs directly.
>
>

Better Integer Support: BigInteger

Now you can have the BigInteger class with these operation supports:

  • Abs (returns the absolute value for a given BigInteger)
  • Compare (compares two BigIntegers)
  • Divide (returns the quotient of two BigIntegers)
  • DivRem (returns both the quotient and the remainder of two BigIntegers)
  • Equals (returns true if two BigIntegers have the same value)
  • GreatestCommonDivisor (returns the maximum number that is a divisor of both BigIntegers)
  • ModPow (returns one BigInteger raised to the power of another BigInteger modulo a third; the exponent cannot be negative)
  • Pow (returns one BigInteger raised to the power of another; the exponent cannot be negative)
  • Remainder (returns the remainder of dividing one BigInteger by another)

A New High-Performance Collection Class: HashSet

The new class HashSet was added to System.Collection.Generic namespace as a unordered generic high-performance collections that contains unique elements. It implements all the standard collection methods (such as Add, Remove, and Contains) and provides several set operations (including union, intersection, and symmetric difference). It’s easy to use and with high-performance.

Pipes: System.IO.Pipes

Both anonymous and named pipes are supported. Now nearly all the pipe functionality provided by Windows are exposed. Now it’s easy to achieve IPC from managed code. If you have experience with Windows native pipes, you will get no trouble to start with the new managed class.

Conclusion

We can expect more complete .NET Framework covering your industry, commercial, personal development requirements. As Microsoft has been described, .NET Framework will as last cover what Win32 SDK covers. It’s not rumor or business advertisement, I believe managed code will be natively supported by OS one day, neither .NET nor Java, or some other languages.