Serving HD View Content with IIS 7

HD View, IIS7 No Comments »

With the default configuration of IIS 7 you will not be able to serve the .wdp images requested by the HD View plugin in the clients browser. The user will get the “Could not create scene from file http://{your source path}/l_{l}/c_{c}/tile_{r}.wdp. hr=0x…” error message displayed instead of the HD View. As found in this discussion, it’s necessary to enable the image/ MIME type on the web server, which on IIS 7 is in done IIS Manager >> MIME Types:


Simply add a MIME Type for wdp and set the MIME type to image/

Then HD View content should display just fine. Hope it helps.

[Slashdot] [Digg] [Reddit] [] [Facebook] [Technorati] [Google] [StumbleUpon]

Wildcard Host Header Binding And Subdomains with IIS7

DNS, IIS 16 Comments »

Like its predecessors, IIS7 does not support wildcard (catch-all) binding or wildcards for host names, see this discussion for the state of things and how the much requested feature didn’t make it into the II7 release version as it stands. So, if you try to add * as a host name in IIS 7 you will get this warning:

The specified host name is invalid. The valid characters are ...

There is only one “workaround” at the web server level and it requires a dedicated IP address for the particular site:

Set up a wildcard host record in DNS: right-click the zone in DNS Manager>>New Host (A or AAAA)>>enter asterisk as wildcard and the dedicated IP address:

New Host for wildcard binding in DNS 

Then create you site in IIS without any host name:


This way DNS effectively takes care of the mapping of the URLs, throwing everything at the bound IP address which is pointing to your site. Here’s hoping that IIS will someday catch up with Apache and allow more flexible wildcard mapping of host names.

[Slashdot] [Digg] [Reddit] [] [Facebook] [Technorati] [Google] [StumbleUpon]

Capitalize with C# and ASP.NET

ASP.NET, C# No Comments »

It may be surprising for some, but the .NET framework has capitalization built in:

using System.Globalization;
class Test
public static void Main ()
string s =
CultureInfo.CurrentCulture.TextInfo.ToTitleCase (“i want this capitalized or capitalised if possible.”);
Console.WriteLine (s);

It’s even easier with VB.NET:

StrConv(yourTextvalue, VbStrConv.ProperCase)

Still not as elegant as capitalize(str) in Rails ActiveSupport, but the approach via globalize might be more maintainable in the long run. Some dislike though, so your mileage may vary.

[Slashdot] [Digg] [Reddit] [] [Facebook] [Technorati] [Google] [StumbleUpon]