Scott Hanselman

Coming Tuesday - dasBlog 2.0 and Medium Trust

August 12, 2007 Comment on this post [4] Posted in ASP.NET | DasBlog
Sponsored By

Well, the plan was to get dasBlog running on Medium Trust and 2.0 and releasing quickly.

Of course, the best laid plans of mice and men, right?

We've set the date for the dasBlog 2.0 Medium Trust Release for this coming Tuesday. Personally, I'm compiling it with Visual Studio 2008 with no problems, and I've recently got it dasBlog compiling and running on IIS7 on Vista 64 with very little trouble. It's Not Scary™.

Tony Bunce has a fine write-up on the issues we ran into with dasBlog on Medium Trust. Here's some highlights:

"The goal of medium trust is for hosting providers to provide functional ASP.NET 2.0 hosting while also protecting against rogue or malicious applications. Unfortunately that protection comes at the cost of application flexibility. ...There are a few features that are limited in a medium trust environment: SMTP on alternative ports and Mail to Weblog via POP3...dasBlog will let you know that you don't have these privileges by displaying warnings on the configuration page.

There is some good news though, these limitations won't affect most users.  Many hosting providers that run limited trust environments don't run in the default medium trust, but rather a "modified full trust".  In that case you may already have all the permissions you need for all of the features to work."

Go check out his post for more details. The most interesting issue we bumped into was that you aren't supposed to be able to call out via HTTP on the server side to any other connections unless they match your originURL in your web.config. In other words, my blog at www.hanselman.com can't call to any other site that isn't hanselman.com. However, you can set you originUrl to a regular expression like ".*" and then you can connect anywhere. Phil Haack noticed this and got the fix from Cathal Connollys.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Hanselminutes Podcast 76 - F# with Robert Pickering

August 10, 2007 Comment on this post [6] Posted in Learning .NET | Podcast | Programming
Sponsored By

My seventy-sixth podcast is up. In this show, I chat with Robert Pickering, author of the very fine Foundations of F#. We ask the question 'Why F#?' and talk about functional languages and some of the features of F# that make it a great introduction to FP for .NET programmers.

NOTE: If you can, while listening to this show, be sure to visit this explanatory post on Robert's blog. It includes the code samples and syntax techniques that he talks about in this interview. Reading the code while listening will help you enjoy this particular show that much more.

Additional Production Note: Check out this post on Sound Quality at Carl Franklin's blog for short before and after samples of Robert's audio track and an explanation of one of the many ways that Carl and his team at Pwop makes the sound quality of this podcast so nice.

If you have trouble downloading, or your download is slow, do try the torrent with µtorrent or another BitTorrent Downloader.

Links from the Show

Examples - Robert Pickering's Blog Post on the F# Show on Hanselminutes (rr0)
F# - Microsoft Research (rr2)
Robert Pickering's F# Blog (rr4)
Book: Foundations of F# - Robert Pickering (rr1)
Robert Pickering's F# Resources (rr3)
MSDN Video on F# (rr5)

Do also remember the complete archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.

Telerik is our sponsor for this show.

Check out their UI Suite of controls for ASP.NET. It's very hardcore stuff. One of the things I appreciate about Telerik is their commitment to completeness. For example, they have a page about their Right-to-Left support while some vendors have zero support, or don't bother testing. They also are committed to XHTML compliance and publish their roadmap. It's nice when your controls vendor is very transparent.

As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)

Enjoy. Who knows what'll happen in the next show?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Changes in the .NET BCL between 2.0 and 3.5

August 10, 2007 Comment on this post [8] Posted in Learning .NET | Programming
Sponsored By

(Actually between the BCL Version 2.0.50727.42 and 2.0 (Version 2.0.50727.1378)

API Changes from org2.0 to 2.0 - Windows Internet ExplorerI was thinking that while folks are blogging about all the new stuff in .NET 3.5 and VS2008 (or VS3.508 as I think to think of it) there must be other fixes here and there in the Base Class Library itself.

I googled around and couldn't find a list of what's changed in the BCL. I'm sure it's out there somewhere and I've missed it and the second I post this someone will post a better list in the comments, but anyway...

First, I look in C:\windows\assembly with Explorer. Remember that this is a "lie" - what you're seeing is a namespace extension's representation of the Global Assembly Cache, although a very useful one. Here's the new 3.5 stuff, sorting by version. This stuff is near all new. New assemblies, etc.

assembly

Nothing in here appears to have "rev'ed" like moving from 2.0 to 3.5 and kept the old version. One might expect to see System.Web 2.0 and then System.Web 3.5, but that's not the case from what I can see.

There is, however, a large amount of new (what I would call) BCL stuff in the new System.Core assembly. Remember that namespaces can exist across assemblies, so releasing a new assembly is a pretty decent way to get sweeping additive changes across a few dozen namespaces in a very compatible way.

Reflector says that System.Core includes new things in System.Threading, System.IO, System.Security, System.Diagnostics, and more. I would encourage you (as I do everyone who will listen) to download Reflector and do this:

  • Run Reflector
  • Hit the Home key on your keyboard
  • Hold down Delete until Reflector's window is clear
  • Press Ctrl-L, then Enter

...and you'll get this dialog. Reflector is smart enough to prompt you to fill up your empty assembly list, and the defaults are so useful that I usually just delete everything and pick one of these.

Start Default Assembly List

As you move around in Reflector, notice the "Location:" arrea at the bottom that tells you where the assembly is (although there are copies in the GAC).

image

Look at all the assemblies in the .NET 3.5 list and you'll see which ones live in the 2.0 directory, the 3.0 directory and the 3.5 directory.

While 3.5 is huge conceptually, on disk it's very small, consisting of the new compilers and basically these three assemblies:

  • System.Core
  • System.Data.Linq
  • System.Xml.Linq

There are other assemblies for MSBUILD improvements and such, but it's still very compact, from a "redistributable" point of view.

I would personally recommend that anyone who hasn't moved their 1.1 shop over to 2005, or who is starting out with .NET to just start with 2008/3.5. The multi-targeting stuff is very slick (I'll do a dissection soon, more detailed that ScottGu's post)

Has Anything Changed?

I wanted to find out what's changed between a standard Windows XP SP2 machine - totally fresh - with just the 2.0 runtime distributable installed, and my Vista machine with 3.5 on it.

There's a really great, but largely unknown, tool called Libcheck that you can download for free, that'll compare two versions of an assembly and show you the differences in a report. It'll look only at the public (inter)face of the assembly. In this case, that's exactly what I want.

It doesn't look to have been changed since 2005, so first I need to download and compiled it and hope it works. Fortunately it comes with source code and rather than spending time converting it to 2008, I just run the included nmake.bat that builds the three supporting libraries it needs and spits out libcheck.exe. Nice and easy (and lazy). There's a couple of obsolete warnings, but they're obsolete, not dead.

First, I brought up my 2.0 XP SP2 VM (again, fresh) and ran the .NET 2.0 Redistributable Package on it. This would be version 2.0.50727.42.

I went to the Libcheck folder and ran this command:

libcheck -store all org2.0

...and libcheck created a database of all the schmutz in 2.0.

Then I ran the same thing on my Vista machine with 3.5 - remembering that it's just going to look at the 2.0 Framework stuff on my system. This version of 2.0 was 2.0.50727.1378.

libcheck -store all 2.0

Notice that one was "org2.0" and the other '"2.0." I then copied all the org2.0 folder off my VM and onto my main machine, then ran:

libcheck -compare org2.0 2.0

The Report appeared in a folder called org2.0to2.0. Then I copied the report up to my blog, and it's available here.

Note: You can modify the text files in /RefFiles and use LibCheck on your own framework internal to your company. That's what we did at Corillian. There is apparently a much better version of this tool (this one is 3 years old) internal to Microsoft. I'll see what I can do to free it.

The percentage of churn was in the single digit percentages. Personally I find the report a fascinating read. You can see what was breaking, what was just added. You can see where new enums appeared and where overrides became virtuals and all sorts of things. Check it out, it's not that scary.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Vista Pre-SP1 Performance and Reliability Fixes

August 08, 2007 Comment on this post [10] Posted in Bugs
Sponsored By

2723_Windows_Vista_logo Everyone knows that Vista SP1 is due out soon, but if you're having any trouble now (I'm not anymore), you might take a look at these two updates:

  • Performance Update - KB938979 - This one has some networking related fixes as well as fixes for some hibernation weirdness, as well as a possible fix for the now-legendary Explorer "estimated time remaining" issue.
  • Compatibility Update - KB938194 - This one contains mostly video driver related fixes.

You don't need to install these now unless you're having some trouble. These should be rolled up into the SP1 when it comes out, so you'll get them automatically later anyway.

If you do download, make sure you get the appropriate 32-bit or 64-bit version.

It doesn't say in the release notes, but I personally recommend that you install 1, reboot, install 2, reboot to avoid problems. Just a good practice, IMHO.

Technorati Tags: , , , ,

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Additional Automatic Printer Driver Installation with Vista 64 as a Print Server

August 08, 2007 Comment on this post [8] Posted in Tools
Sponsored By

Now that I'm running Vista 64, while most everything is running very smoothly, there's an occasional reminder here and there that I'm living in an alternate universe.

I'm still running a Canon Pixma MP500 Multifunction Inkjet and the fact that Vista 64 drivers were available for download confirmed that this Printer was a great decision.

However, when I tried to connect from one of my XP VMs or from my Wife's Vista32 machine, I was told that Drivers weren't available. I'm used to connecting to a printer in Windows "just working." I just visit the machine, like \\QUADPOWER, hit the Printers folder and double click the Printer. In this case, my system had only the 64-bit drivers I had already installed.

Here's how to tell your 64-bit system that it has 32-bit drivers it can serve to the family (or the reverse):

  1. From your server, go to the Printers folder and right click to get your Printer's Properties. Click the Sharing Tab and click Additional Drivers. You'll see this dialog or something like it.
    Additional Drivers

    Here you can see that the only driver available is x64 on my system. Click the x86 checkbox and click OK. You'll be prompted for an INF file - the new printer driver. Now you need to find the Printer Driver...
  2. Go get the 32-bit Driver for your printer. In my case the 32-bit Vista Driver was packaged in a WinZip EXE and it refused to run on this 64-bit system.

    Trick: Because it's a WinZip Self-Extracting Archive, I renamed it from .EXE to a .ZIP file and unzipped it into a folder using the standard Windows unzip facilities..

    Next I pointed the Open File Dialog from before at the folder with the 32-bit Printer's INF files. In my case it was called Drivers so it was obvious. Sometimes you'll have to dig, but the are in there. You'll know you found it when the Additional Drivers dialog looks like this:
    Additional Drivers (2)

Now I can point my XP or Vista machine at the Vista 64 \\QUADPOWER machine and it'll automatically install the correct drivers for the client machine.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.