Remote Desktop /console Switch Removed by XP SP3 Upgrade

by Mark Berry 7/12/2008 8:18:00 PM

I recently upgraded my XP desktop to Service Pack 3, which includes an update to Remote Desktop Client 6.1.

Today I locked a Windows Server 2003 console session at a client site, then tried later to access the console session by typing "mstsc.exe /console" from the command line. Instead of connecting to the console, I found myself dropped into a new session on the server. When I started Terminal Services Manager on the remote machine, I saw two sessions, including the console session. When I tried to remote control the console session, I got the message, ""Can't remote control session (ID 0)."

I finally found this Terminal Services Team Blog post with the explanation:

Changes to Remote Administration in Windows Server 2008

There are reasons why /console is no longer needed in Windows Server 2008. Apparently that justifies removing this functionalitiy from RDC 6.1, even when connecting to Windows Server 2003. Worse, the connection succeeds but "silently ignores" the /console switch.

Fortunately, there is a workaround:  use the new /admin switch instead.

Both the application-specific Help file and the Windows XP Help and Support Center still list the missing /console switch and do not mention the /admin switch. Note to Microsoft:  if you're going to "silently" remove functionality, at least update the documentation!

Multiple Controllers Found with the Name 'HomeController'

by Mark Berry 7/3/2008 9:25:00 AM

I've been playing with Billy McCafferty's S#arpArchitecture. I decided to strip the Northwind references out of the sample so I could try the framework on my own project. After removing the Northwind-specific files and renaming the remaining files and namespaces to "MyProject," I kept getting this error when I started the application:  "Multiple controllers found with the name 'HomeController'": 



Sometimes I would instead get a message that no HomeController could be found.

The Controllers project contains one (and only one) HomeController class. If I comment out that class, the project starts fine:  the home page appears as expected. There are no other occurrences of "HomeController" anywhere in the solution--so where is the HomeController that is actually running to display the home page?

The Solution 

With the help of Billy McAfferty in the CodePlex forum, I discovered that there were several instances of Northwind-related DLLs and other files hanging about in various bin and Debug folders, especially in the MyProject.Web\bin folder:

MyProject.Controllers\obj\Debug\Northwind.Controllers.csproj.FileListAbsolute.txt
MyProject.Core\obj\Debug\Northwind.Core.csproj.FileListAbsolute.txt
MyProject.Data\obj\Debug\Northwind.Data.csproj.FileListAbsolute.txt
MyProject.Tests\obj\Debug\Northwind.Tests.csproj.FileListAbsolute.txt
MyProject.Web\bin\Northwind.Controllers.dll
MyProject.Web\bin\Northwind.Controllers.pdb
MyProject.Web\bin\Northwind.Core.dll
MyProject.Web\bin\Northwind.Core.pdb
MyProject.Web\bin\Northwind.Data.dll
MyProject.Web\bin\Northwind.Data.pdb
MyProject.Web\bin\Northwind.Web.dll
MyProject.Web\bin\Northwind.Web.pdb
MyProject.Web\obj\Debug\Northwind.Web.csproj.FileListAbsolute.txt
MyProject.Web\obj\Debug\Northwind.Web.dll
MyProject.Web\obj\Debug\Northwind.Web.pdb

I deleted those files, reran the project, and voilà! I'm back to only one HomeController. (I set a breakpoint in my HomeController class just to be sure it is getting there.) Now the default page appears as expected. Just to be safe, I then followed Billy's suggestion to delete all the bin and obj folders and then do a full rebuild:  yep, still works! Thanks Billy.

Virtualization, Source Control, and Bug Tracking

by Mark Berry 6/6/2008 5:47:00 PM

I attended the San Diego .NET Developer Group on Tuesday. Nick Pearce gave a great presentation on how to use virtual machines as a developer. I jotted down a few notes on topics he and others mentioned.

Virtualization

Some random notes: 

  • Nick is moving from Virutal PC to VMWare for the dual-monitor support.
  • Remember to turn on hardware virtualization support in your computer's BIOS. Some (like my Thinkpad) disable that by default. 
  • A quad-core processor might help performance with multiple virtual machines.
  • Use a separate disk drive for a differencing volume to reduce contention.
  • You can clone a PC image, but use SysPrep or (XP only) NewSID to fix the SID in the clone.

Source Control

Several products were mentioned:  SourceGear Vault, PerForce, Subversion.

Bug Tracking

More products here:  FogBugz (integrates wtih PerForce), Trac, BugTrac, Mingle

Getting Exchange 2003 to Accept Mail for a Secondary Domain

by Mark Berry 5/19/2008 10:47:00 PM

I had a customer some time ago who always spelled out my full company name when sending  me email. I finally registered mcbsystems.com so I could receive her emails.

Since then I've implemented Exchange 2003 (under SBS 2003), but apparently I never tested the domain alias until I was setting up Postini. It turns out that Exchange was bouncing messages sent to the domain with a "550 5.7.1 Unable to relay" message.

My situation  pretty much matches the second "class" of SMTP domain in this Microsoft Knowledge Base article:

Setting up SMTP domains for inbound and relay e-mail in Exchange 2000 Server and in Exchange Server 2003

Howver, whereas the article suggests changing the SMTP connector to allow messages to be relayed to this domain, I discovered another option. If I go to Recipient Policies > Default Policy > E-Mail Addresses (Policy) tab, create a policy @mcbsystems.com, and check the box to the left that causes it to auto-generate the address for new Active Directory users, relaying works. If you don't check the box for auto-generating addresses, relaying only works if it is set up in the SMTP connector. I'm not sure what auto-generation of addresses has to do with relaying, but I thought I'd better write this down before I forget it!

Upgrading from BlogEngine.NET 1.1 to 1.3

by Mark Berry 5/16/2008 6:16:00 PM

Time to Move On

 I've been pretty happy with BlogEngine.NET 1.1 for the last ten months, but I don't want to get too far behind, so I decided today to update to the current release, BlogEngine.NET 1.3.1.

This procedure is specific to my installation, but it may give you some guidance on how to upgrade your installation. As background, my setup is as follows:

  • I run my own web server under Small Business Server 2003.
  • IIS is set up with all .NET 2.0 applications sharing an application pool called NET20AppPool.
  • I set up a new application for blogs called, uh, blogs. This maps to a virtual directory called inetpub\blogs.mycompany.
  • Inside the blogs.mycompany folder is a subfolder containing the actual blog application. I call this mark.

Getting Ready

I watched Al Nyveldt's installation video for a helpful refresher on how to set up BlogEngine.NET. I decided to get the base install of version 1.3.1 working first, then to copy in the settings and posts from my previous installation.

Do the Upgrade

Follow these steps to upgrade from BlogEngine.NET 1.1 to 1.3.1:

  1. Download and unzip the web installation file. Rename the unzipped folder to mark.
  2. In IIS, stop the blogs application and the DOTNET20AppPool.
  3. In Windows Explorer, under inetpub\blogs.mycompany:
    1. Rename mark to mark.old.
    2. Move the unzipped mark folder to inetpub\blogs.mycompany folder.
    3. Remove any existing permissions from mark. Go to Advanced to inherit permissions from inetpub\blogs.mycompany.
    4. Go to the App_Data folder and give NETWORK SERVICE Modify permission. (I have NET20AppPool set up to use the NETWORK SERVICE account.)
    5. Edit mark\robots.txt to point to the correct path.
    6. In the App_Data folder, copy settings.xml to settings.orig.1.3.1.xml.
    7. In the old App_Data folder, use Microsoft Word or SourceSafe to display the differences between Settings.orig.1.1.xml and Settings.xml. In the new App_Data folder, make the corresponding changes to Settings.xml.
    8. In the new App_Data folder, delete the contents of the log, pages, and posts folders.
    9. Copy the following files and folders from old App_Data folder to the new App_Data folder, overwriting when necessary:

      blogroll.xml
      categories.xml
      roles.xml (wasn't present in 1.1 but probably need to copy when upgrading past 1.3.1)
      users.xml
      files\*.*
      log\*.*
      pages\*.*
      posts\*.*

    10. Copy the old themes\mytheme folder to the new themes folder.
  4. In IIS, start the DOTNET20AppPool and the blogs application.
  5. Open the blog in a browser.

Test and Debug

When opening the blog in a browser, you may encounter errors if underlying technology has changed. Check the server's event log if you get an error. On this update, I found that Utils.SafeMail was no longer there. So in mytheme\sidepanel.ascx, I copied in the new alternative (which uses a contact form) from the Standard theme. The required contact.aspx form was already there; I edited it to put the labels and fields in a table for a nicer look. I also edited RecentPosts.cs to add a space before the Comments and Ratings labels to keep them from running together.

You should check the Control Panel > Settings tab to see if there are new settings that you want to configure. I chose to uncheck Enable post ratings for now. I also changed the avatar processor from Combination back to Gravatar. This got rid of the colorful but squirrelly icons that must be coming from Monster when the person has no avatar.

By the way, I initially formatted the above procedure in FrontPage 2003, complete with a, b, c, d, etc. for the sub-points. This created an <ol type="a"> tag. For some reason, BlogEngine.NET strips out the type attribute when I paste in the HTML, leaving incorrect sub-point numbering. No fix for that now.

Fix the Theme

I wound up having to re-do most of my theme modifications, which weren't too extensive:

  1. Copy the contents of the current themes\Standard folder to the themes\mytheme.
  2. In site.master, add my "customized by" note to the footer.
  3. In sidepanel.ascx, copy in the previous About Me table. (See the note above about using the new contact form instead of Utils.SafeMail.) Remove a few sectiosn I don't use (Calendar etc.). Make the Archive header a hyperlink to thew new archive.aspx page. Copy in the previous Disclaimer text.
  4. Modify style.css to use the colors used in the old version. (There are lots of new styles, so you can't just use the old version.) Add the following styles to the Side Panel section to handle a hyperlink (now that the Archive header is a hyperlink):
		#sidepanel .box h1 a {
	color: #999999;
	text-decoration: none;
	}
	#sidepanel .box h1 a:hover {
	text-decoration: underline;
	color: #003399;
	}
	

Powered by BlogEngine.NET 1.3.1.0
Theme by Mads Kristensen. Customized by Mark Berry.

About the author

Mark Berry Mark Berry owns MCB Systems, a firm active in both IT administration and .NET software development.

E-mail me Send mail
`

Disclaimer

The opinions expressed herein are my own personal opinions and absolutely represent my employer's views. I'm self-employed! Please keep in mind that what worked for me or someone else may not apply to your situation. Always have a good backup, and use any information here at your own risk!

Entire contents copyright © 2008 by MCB Systems. Sign in