Friday, January 30, 2009
Virtual Lab Broken
Thursday, January 22, 2009
Another Software-Smith video on MSDN.
Tuesday, January 20, 2009
My SharePoint video on MSDN
Sunday, January 18, 2009
Getting Virtual Server running under Vista Home Premium
My first step was to get a laptop with enough memory, I chose a Lenovo 3000 N200 TY2BEGE with 3GB RAM for Euro 699,00 from www.cyberport.de First surprise, the internet price was 729,00 in spite of having the latest printed catalogue. But still seemed reasonable, about GBP 540,00 or $1070, including tax. The laptop and the memory arrived separately, but it was easy enough to install. Seemed reasonable to buy 3GB, does not seem that buying 4GB would let me address more than 3GB at present with 32 bit.
Next step, operating system. XP or Vista? 32 or 64 bit? Since my laptop came preinstalled with Vista Home Premium 32 bit, I took a deep breath and said to myself, let me work for a while with Vista, if I becomes necessary to install a new operating system and hunt down the drivers, I can always start from scratch later. I have almost all my data on USB drives, so I can work from almost any machine. My concern with Vista was that it would eat up memory that I could use more effectively in my virtual machines. But I decide to bite the bullet for now. (or in German there is an idiom about biting sour apples, but it doesn’t make any more sense!). The difficulty with drivers when I noticed a web cam on the laptop although it was not mentioned in the documentation, the reason being, there is no driver for this hardware under Vista.
Next step, which virtual machine software to use. I basically have to stick with Microsoft software rather than VMWare, since I do so much training and consulting for Microsoft. Also as a Microsoft Certified Trainer, I am supplied virtual machines prepared and tested for Virtual Server. Running several machines at once would push me in the direction Virtual Server 2005 R2. I will miss the dragging and dropping of files to the desktop feature that in Virtual pc 2007 has.
But have you ever tried to install Virtual Server under Windows Vista Home? You straight away get an error message that this is not supported. No problem, thought I and clicked through the error messages, expecting it to install anyway. But instead it aborted the installation. Googled and found contradictory info if installation was possible or not. Got the tip to try installing IIS. Here are the Windows features I switched on under IIS: (under Web management tools)IIS Management console(Under IIS 6 Management compatibility) IIS Metabase and IIS 6 configuration compatibility IIS 6 WMI compatibility(Under WWW services) Common http features (all) Application development features (all) (Under Perfomance features) Static Content compression (Under Health and Diagnostics) HTTP Logging Request Monitor Security (all)Note that there is no Windows authorization under security for Vista Home Premium. I may not have the feature names word perfect, my Vista is German. Then I allowed anonymous access to the IIS and added a password to my user account. After this I could install Virtual Server 2005 R2, (make sure of the R2) and it worked. I fiddled quite a bit with IIS authentication, but I think I set the settings back to the default, so hope I have not forgotten a step here.
Was it worth all the work? It seems to be running well. I have also tried out the VMRCplus which is a free download from here It is certainly very comfortable, but using unsupported software always seems such a temporary gain.
Tuesday, January 13, 2009
Book review time
I was very impressed with Microsoft® .NET: Architecting Applications for the Enterprise by Dino Esposito and Andrea Saltarello. I often teach dot.net programmers and there was much in the book I could use in class when passing on architectural principles. For example, rather than just warning about spaghetti code they have the alternative, lasagna code. Absolutely uptodate at the moment, the entity framework is also discussed.
MCTS Self-Paced Training Kit (Exam 70-536): Microsoft® .NET Framework—Application Development Foundation, Second Edition is fairly dry since it has just the information needed for the exam. Competently done however with each module selfcontained and would work well for reference as well. I will use some of the concepts on Code Access Security in my SharePoint developer classes.
Saturday, January 10, 2009
Saturday, January 3, 2009
How to skin the Starter Site
Ok. Hold your mouse back. Don't start changing the CSS just yet! Starter Site is a real ASP.NET 2.0 site so you can go to the App Themes directory and see the default theme. Simply right click and create a new Theme. You can start by copying the CSS and gif's into this theme directory. Now change the webconfig to use the new Theme. Why do this work, if you are not planning to change themes programmatically? I find it a debug help to quickly change back to the Adventure Works theme if I have problems. I have seen css bugs make lines invisible, for instance. The CSS has a nice comment at the front as to which colors are used in the CSS, why not comment your changes too? Don't forget to replace search, the colors are used in more than one style.
You probably want to change the logo, this is referenced in the style sheet. (aw-banner.gif) Nice touch, because you will always want to change the logo if you are changing the theme. I usually get my gif's from the company web site if I am doing a demo. You will probably want to change the adverts also, you can put new url's in the adverts using the Marketing Manager. I like to demo the feature of the revolving ads, and make ad's from other divisions of the company, or from their web site directly. Usually goes over well.
Because Starter Site is a proper ASP 2.0 everything page is based on the master page. However every page seems to reference the master directly, so you would have to do a project wide search and replace if you want to switch to another master page. It could have been done better, allowing just a change in the web.config to change the master. I just make a copy and then make my changes directly in the default.master
But this is not real skinning you say? Just getting there. Add a new item to your App theme directory. Make it a skin file and call it default.skin. Now it does absolutely nothing! Well, it is empty apart from a comment. Now copy a button from another page. (e.g. login.aspx) . Now delete everything from the button except runatserver. Add a style change to the button eg(backcolor=lightblue). Save and look at any button on your site. Voila! Try out Text boxes and have fun. If you need more info, just go to the ASP.NET pages in MSDN, this is not a Commerce Server specific feature.
What is left to do? I usually massage the catalog, creating a test category to hide all the Adventure Works categories and creating a little navigation structure to model the customer's. And then I create a few products and gif's for the demo.
The demo awaits. Don't forget to practise your demo in a real dry run. And resist the temptation to make last minute changes.
(Don't ask me why I said that, I don't want to be reminded of the time...)
Happy skinning!
Friday, January 2, 2009
The real quick CS2007 installation guide (SpeedSmith)
Have you looked at the ''quick'' installation guide for Commerce Server 2007?
http://go.microsoft.com/fwlink/?LinkID=79888.
21 pages of step by step instructions?
Most customers I know just sort of wing it trying to get Commerce Server going and then run into problems because they missed a step.
1. If I make the machine using evaluation software, next time I want to use the virtual machine much of the time periods are just about to expire.
2. If I use my own versions of software, I cannot leave the virtual machine with the customer. Plus I would like to teach him how to install and change his own machine.
For some situations it is enough to use the virtual labs for Commerce Server, but see that they do not have the Starter Site installed. If I just want to check something on the CSharp site, they are the quickest way I know: (see previous blog)
What makes it real quick is that we have already downloaded everything we need onto a USB disk! The 30 days evaluation only starts with Step 1 and with a MSDN Windows 2003, is easily extensible to 120 days. (1 year if you use MSDN Commerce Server and Visual Studio).
Step 0 Download
Download everything you need. This is the longest part of the procedure, but only has to be done once! In class we go directly to step 1.1.
0.0 Download Virtual PC 2007 (30MB).
? Why not VMWare? Because we want to use the evaluation Virtual machine from Microsoft with Windows 2003 and SQL 2005 Preinstalled.
? Why not Virtual Server 2005 FP1? Because most of our developers have workstations.
I have Virtual PC 2007 already installed, but I have some students who bring their own laptops, and so loaded this down all the same.
We had a DVD already with 180 Day Trial, and just uploaded to disk to speed up the installation. If our students have a MSDN licence, then we use that version.
http://www.microsoft.com/technet/prodtechnol/comm/2007/downloads/trials/privacy.mspx
Save yourself time later and unpack this file now.
If our students have a MSDN licence, then we use that version.
This came out after the release of Commerce Server, but rolls up many of the smaller patches mentioned in the long installation instructions.
http://go.microsoft.com/fwlink/?LinkID=63706
Save yourself time later and extract KB913393.exe from the CAB file now.
Save yourself time later and unpack this file now.
http://go.microsoft.com/fwlink/?LinkID=59276.
This is the big one! I left it running overnight. Extract the files by clicking on the EXE, but do not start the virtual machine. This step took me 13 minutes. Make a copy now of the extracted files, if something goes wrong during activation you will not have to load them down again.
? Would it not be quicker to create my own virtual machine? As long as you have Windows 2003 installed and the whole of SQL 2005 including Reporting and Analytics, this is fine. But we have done our testing on the Evaluation Virtual Machine we downloaded
? I do not want my version to expire in 30 days. You are given an opportunity later to give a MSDN Windows key, so that the Windows version will not expire.
0.10 Create a virtual disk in an existing Virtual PC using the Wizard. Copy all the downloaded and extracted files from 0.2 to 0.8. into this disk.
1.0 Install Virtual PC 2007, if needed.
1.1 Setup and Start the Virtual PC (3 minutes).
In Virtual PC, run the wizard for new virtual computer. Use an existing virtual computer and point to the vmc file you extracted under Step 0.9. Leave the box checked to enter the configuration. You will get an error message that it is expecting Virtual Server. Click the box not to show this message again and OK. Click Settings and adjust the memory to 700MB or more. Click on Disk2 and link the installation disk you created on Step 0.10. Then, start the Virtual Machine
1.2. Sign in as Administrator and password Evaluation1. Use disk manager to give a drive letter to the installation hard disk.
1.3. Apply Windows 2003 SP2. 20 minutes. Restarts.
1.4 Apply SQL Server 2005 SP1. 20 minutes
1.5 Install Visual Studio 2005. 13 minutes
To speed up the installation I deselected the following:
Visual Basic,
Visual C++
Visual J++
Dotfuscator
Tools for Redistibuting
SQL Express Edition
Optional (Install MSDN 15 min)
1.6 Add the following components: (2 minutes)
Indexing Service
Application Server: ASP.Net, DTC
Application Server, IIS: FTP, SMTP Service
When you are asked for the CD browse to the c:\WindowInstallationFiles
1.7 Add the following components:
Run the KB913393.exe from the installation drive you made in step 0.10. (1 minute)
Run ndp20kb916002-x86.exe from the same installation drive (2 minutes) Reboots.
1.8 Add the administrator to the IIS_WPG.
Change the identity of the DefaultAppPool to Administrator
Do this first so can benefit from reboot
2.0 Install Commerce Server 2007
Select all options. It will not reboot. 8 minutes. Uncheck the box for configuration wizard.
Install the Business User Applications ( 1 minute)
Configure Commerce Server with the default options.(but I checked the box for create Virtual Root for staging). Ignore the warnings about Admin privileges and ASP net. (1 minute)
Use the Commerce Server Site Packager and unpack the StarterSite. (4 minutes)
Select Programs>IIS Resources > SelfSSL > SelfSSL
From the command prompt type selfssl /t /V:400
From the Install drive, where you had the starter.pup file.
Type:
Sampledataimport c:\Inetpub\wwwroot\StarterSite
And you are done! The installation itself takes just over an hour, which is doable in class. What is not possible in class of 10 students is to expect students to follow 21 pages, and have each student with an installation that works.
Perhaps having everything running as adminstrator might be strange, but wasn't that the way we always used to build evaluation software before? In class, I first demo the working software, and the starter site. When the students are confident that their virtual machine works, we then introduce your favorite utility Azman and start locking things down.
I don't expect that even my 4 page SpeedSmith Installation is without bugs, but I think it is a foundation to build upon. Let me know what you find. I will add blog entries for bugs I find in class. Can we speed it up still further? Windows 2003 SP2 is not strictly necessary, we could do individual hotfixes and save the 20 minutes, but that sounds like a temporary solution. We also want to do some performance tests with updating the virtual machine utilities.
Thursday, January 1, 2009
Tip: Misuse the virtual labs!
Lab1: Connected Commerce http://go.microsoft.com/?linkid=6650616This is the BizTalk one. Basically the lab consists of settting up a send port to import a catalog into Commerce Server. Most people with a knowledge of Biztalk say Aha! when they see the dropdown for Commerce Server Catalog in the Port type. (Non-Biztalk people will say nothing during entire lab)
Lab 2: Customizability and Extensibility http://go.microsoft.com/?linkid=5836744 Adding an audit trail to the Catalog using stored procedures and Visual Studio.
Lab 3: Profile Integration and extension http://go.microsoft.com/?linkid=5584696 This is a good teaching lab. Adds Dot.Net authentication to Commerce Server and then adds an extra column to the UserObject table. Those who know ASP 2.0 will find the first part trivial, those who know CS 2002 will find the second part trivial, but if you know everything why are you taking a lab?