.NET Framework 4.0 Beta 2 Installation Error: Unable to create or save new files in the folder…

When trying to install the .NET Framework 4.0 Beta 2 on the Windows partition of my Macbook Pro, I encountered this error:

Unable to create or save new files in the folder into which
the files are being extracted. Please check the folder properties
to ensure you have permission on the folder to
write files and that the folder is not read-only.

Apparently, Visual Studio 2010 Beta 2 is trying to extract files into my Mac partition–even though i didn’t tell it to do this!

To fix this problem:

1. Launch Control Panel
2. Select System and Security
3. Select Administrative Tools
4. Double-click Computer Management to launch the Computer Management Console
5. Select the Disk Management node in the left pane
6. In the right pane, right-click the Mac drive (E: in my case)
7. Select Change Drive Letter and Paths… from the shortcut menu
8. In the Change Drive Letter and Paths dialog, select the Mac drive and click the Remove button
9. When the Disk Management dialog is displayed, click Yes to the confirmation question.
10. When the second Disk Management dialog is displayed, click Yes again to continue.

Now .NET Framework Beta 2 installs without a hitch!

Best Regards,
Kevin McNeish
iNETA Speaker
Chief Architect, MM .NET Application Framework

Fixing the MS Office SP2 "Outlook cannot connect to your incoming POP3 account" error

Bad Outlook Juju

So, when I got up this morning, I noticed my computer had rebooted–my main development machine is a MacBook Pro, and I was booted into Mac OSX rather than Windows Vista where I had left it last night.

Step 1: Uninstalling Microsoft Office SP2

I then realized I couldn’t send or receive mail–the last mail I received was from last night–so I immediately suspected a problem with a Windows Update. Sure enough, after a quick Google search I determined that others were experiencing the same problem. Fortunately, Googled “Uninstall Microsoft Offfice SP2” andI came across a link that mentioned an uninstall tool for Office 2007 that allows you roll back the service pack:


UNFORTUNATELY, this didn’t work for me, but it’s definitely worth a try if you are experiencing the same problem, because it definitely did fix the problem for others…

The caveats in the readme.txt file mentioned that this uninstall tool only works for MS Office Service Pack 2 or higher. Here are the other conditions:

– Assists in uninstalling client patches only; Does not install server patches
– Command Line tool so help can be accessed by running “oarpman /help” from the command line. This will describe each of the available commands
– Using the /log switch with the /report switch provides some extra information in the log that is not output to the console.
– A “release” is a collection of patches. To see what releases are available for uninstall, use the /report switch. The 2007 SP Uninstall Tool will remove all of a given release. It does not uninstall per patch, or per product.  For example, if you have Microsoft Visio Service Pack 2, Microsoft SharePoint Designer Service Pack 2, and Microsoft Office Professional Service Pack 2 on the computer, the tool will attempt to uninstall all three.
-The /report switch will only display patches that are part of a release that the tool can uninstall.
-When logging is enabled with /remove, the MSI logs are also copied into the same directory as the oarpman log.

The Readme.txt file also contains the following basic workflow for uninstalling:

1 – User installs (or has already installed) Service Pack 2 or higher.
2 – User downloads the 2007 SP Uninstall Tool and expands the package to a working directory.
 Please Note: You must choose a subfolder for expanding the tool (e.g., c:\subdir). You cannot expand the tool into the root directory of the drive (e.g., c:\).
3 – User opens a command prompt under administrator context and navigates to oarpman.exe.
4 – User wants to see what the tool can do, so types:  “oarpman /help”
 Help is shown, describing the tool and switches.
5 – User wants to see what can be uninstalled, so types: “oarpman /report /log c:\logfolder\logname.log”
 The /log switch is optional, but does provide extra information that is not displayed to the console window.
6 – User now looks at the console window, or opens the log, and notes what patches are installed. Also, identifies what releases are installed by looking at the “Release” column.
7 – User wants to remove the Service Pack from the machine, so types: “oarpman /remove <release name> /log c:\logfolder\logname.log”
 This will begin removing the Service Pack release from the computer, create an oarpman log, and copy the MSI logs to the path specified with the /log switch. The time it takes to uninstall will vary, based on how many products are installed, how many Service Pack updates are installed, the speed of your processor, etc. Uninstall may take as long, or slightly longer, than it took to install the Service Pack updates.
8 – User may run “oarpman /report” again to verify that all releases have been removed.

When you run the uninstaller, you will see a number of messages that look something like this:

<Guid> <Guid>

Don’t close the Command Window yet! When Service Pack 2 has been successfully removed, you will see a message in the command window that says:

UninstalDon’t rebott yourl successful. Please reboot..

At that point, I rebooted and Outlook and am STILL not able to send/receive e-mail…now I’ll try completely uninstalling Outlook and installing it again!

Step 2: Completely Uninstalling and Reinstalling Microsoft Office

Unfortunately, although this step didn’t work for me. After uninstalling and reinstalling, I was STILL unable to send/receive e-mail and was STILL getting the “Outlook cannot connect to your incoming POP3 account” error!

Step 3: Uninstalling individual updates

At this point–still trying for the minimal approach, I rolled back individual updates that had been applied to my machine the night before.To determine which updates were applied, you can do the following:

1. Go to the Windows Control Panel
2. Open up the Windows Update section of the Control Panel
3. At the top of the Window is an option to uninstall updates. Click on that…
4. In the list of installed updates, select an update and then click Uninstall

This took a few hours to complete…again, unfortunately I was still getting the same error in Outlook!

Step 4: Install Windows 7

Well, I had meaning to install Windows 7 anyway, so, left with little options, I downloaded and installed Windows 7 on my machine. I decided to do an upgrade rather than a fresh install, and the installation actually went very well! My laptop was mostly functioning, but now I couldn’t access the Internet through Internet Explorer or from Outlook.

Step 5: Install the new Snow Leopard OSX Operating System and Parallels Desktop 4.0

As I mentioned earlier, I’m running both Windows and OSX on my Macbook Pro. I thought it best to get the latest OSX drivers (Bootcamp drivers) that work with Windows 7. As it turns out I needed to upgrade OSX from Leopard to Snow Leopard. Since my wife and I were headed out that day to Richmond, VA, I stopped at the Apple Store and picked up a copy of Snow Leopard as well as the latest version of Parallels Desktop–this is the tool I use to run Windows applications from within the Mac OSX.

The installation of Snow Leopard worked without a hitch, as did the installation of Parallels Desktop 4.0. I could now run a Windows 7 virtual machine from OSX. I set up Parallels desktop so my Windows virtual machine could share an Internet connection with OSX. However, even though I could access the Internet from OSX, I was still unable to access it from Windows 7–whether I ran it from an OSX virtual machine or if I booted directly into Windows 7 at startup.

Step 6: Installed the New Version of Norton Internet Security

Interestingly enough, I was able to access the Internet on Windows 7 by using the Safari browser–worked without a hitch, so I knew my Internet connection was working well. Also, I tried booting into Windows 7 with Safe Mode, and I was able to access the Internet using Internet Explorer, Safari, and Outlook…I was almost there. When you have problems accessing the Internet, it is often caused by an anti-virus or firewall program. So, I checked out the Norton web site and discovered there was a new version of Norton Internet Security that works well with Windows 7. I purchsed the upgrade, downloaded and installed and….it worked! Now I am completely up and running with MacBook Pro running OSX and Windows 7.

This is certainly more fun than one person should have!

Best Regards,

Kevin McNeish
INETA Speaker
.NET MVP from 2002-2009
Chief Architect MM .NETApplication Framework


Visual Studio 2010, .NET 4.0, C# and VB .NET 4 – What’s New?

I’m starting a series of blog posts today on what’s new in the following technologies:

– Visual Studio 2010
– .NET 4.0
– C# and VB .NET 4

I’ll be giving my take on these technologies, grading them, and talk about how they can and should impact your software development.

Here’s the big picture for Visual Studio 2010…in subsequent posts we will dive down into details of the new features.

Visual Studio 2010

Visual Studio itself has changed more than any of the other technologies. Working with the beta, I’m amazed at how stable it is. Here are some of the big changes (note that I’m only listing changes for VS 2010 at design time–I’ll be talking about other changes to core technologies such as WPF, WF, ASP.NET, and so on in a future post):

WPF and Silverlight

If you are a WPF or Silverlight developer, you need to use Expression Blend less because:

– Data Binding is now supported for WPF and Silverlight applications – you can even use Drag and Drop to quickly create and bind a user interface
– You can now lay out a user interface in Silverlight – in VS 2008, there was only support for WPF UI layout

Entity Framework Enhancements

– Model-First is now supported – in VS 2008, EF design was bottom up – you could only create an Entity Data Model from a database. Now you can create a database from an Entity Data Model

– Greater control over how foreign keys are handled

– It’s easier to test Entity Framework applications

– You can use Plain-Old-CLR objects (POCO) with the EF. You don’t need to subclass your entity objects from a .NET entity type or implement an interface – unless you want to

– It’s easier to create n-tier apps with EF

– It’s easier to customize the code generated by the EF

– The Model Browser window allows you to delete objects from the storage model

– You can now search the conceptual and storage models for a specific string

– Automatic pluralization / singularization of class names when generating from a database

– Lazy loading and more stored procedure mapping abilities

– Better LINQ support

– Improved T-SQL performance and improved readability of generated queries


– Clean web.config files contain less information by default

– New project templates that provide more functionality out of the box

– ASP.NET Code Snippets now work for HTML, ASP.NET markup, and JavaScript

– New field templates for URLs and e-mail addresses

– New dynamic hyperlink control

– Client template rendering

– Improved CSS Compatability

– JScript IntelliSense enhancements

– Deployment improvements including:

– Web packaging (creates a deployment zip file with everything you need to install)
– Web configuration-file transformation (Transform a web.config file from development to production settings)
– Database deployment – (VS includes SQL Scripts and optionally data in the deployment package which it can run at installation time)
– One-cick publishing (Use IIS remote management service to publish a Web application to a remote server)

– Support for the MVC-Based Web Applications

– Enhancements to ASP.NET Multitargeting

Visual Studio 2010 Editor

– Enhanced docking behavior, including support for multiple monitors

– Zoom in/out of any code editing window or or text editing window

– Call hierarchy for C# is available at design time (vs. stack trace available at run time) that allows you to explore execution paths by examining compex chains of method calls.

– Navigate To – Allows you to search for a symbol or file in the source code

– Highlighting References – When you click a symbol in source code, all instances of that sybol are automatically highlighted

– Generate from usage – allows you to use classes and members before you define them

– IntelliSense now has two modes–standard and consume-first. You use consume-first if you are using classes and members before they are defined (Type Ctrl+At+Space to switch to consume-first mode). This is useful when doing Test-Driven-Development and you are writing tests first.

Team System Architecture

– New architecture explorer

– New Model Explorer

– New Diagrams support for UML 2.1.1

– Layer diagrams
– UML Class diagrams (different than the class diagrams introduced in VS 2005 – now there are two kinds of class diagrams)
– UML Activity diagrams
– UML Use case diagrams
– UML Sequence diagrams
– UML Component diagrams

– New Modeling Project which contains your UML diagrams

– Generate Sequence, Class, and Layer Diagrams from code

Office Business Applications

– Build Office applications that span multiple versions of Office

– New designer support for building flexible UI’s in WPF or Fluent

– Easier to consume data with LINQ and enhanced data-binding capabilities

Visual Studio Extensions

Extension Manager lets users easily add and remove Visual Studio Extensions

Quality / Testing

– Test Impact View – Identify and run only tests impacted by specific code

– Test Runner Tool – New tool that a test users to guide them through a series of steps to complete a test case. It can take snapshots of test environment, appication screen shots an video for assistance in reproducing bugs

Soure Control

– New enhanced version control features including gated check-in, branch visualization and build workflow

– Can now perform constraint checks on code during check-in based on the Architecture Layer Diagram

Project Management

– New integation with Project Server for enterprise-wide project management

– New features for Agile project scheduling with Excel

Best Regards,
Kevin McNeish
INETA Speaker
Chief Architect – MM .NET Application Framework

ASP.NET: Storing JavaScript in a separate .js file

Rather than hard-coding your JavaScript into an aspx page, you can store you JavaScript functions in a separate .js file. This allows your furnctions to be used from multiple pages.

For example, you could add a .js file to your project (right-click your project and select Add New Item | JScript File) from the shortcut menu) and place the following function in it:


function isValidEmail(emailAddressControl) 
    var emailPat = /^(\".*\"|[A-Za-z]\w*)@(\[\d{1,3}(\.\d{1,3}){3}]|[A-Za-z]\w*(\.[A-Za-z]\w*)+)$/;
    var emailid = emailAddressControl.value;
    var matchArray = emailid.match(emailPat);
    if (matchArray == null) {
        alert("Invalid e-mail address");
        return false;
    return true;    

In your web form Page_Load, you can add the following code


if (!Page.ClientScript.IsClientScriptIncludeRegistered(typeof(pgOrders), "MyScript"))
    Page.ClientScript.RegisterClientScriptInclude(typeof(pgOrders), "MyScript", "JScript.js");

The call to IsClientScriptIncludeRegistered() checks if the JavaScript file has already been included. The call to RegisterClientScriptInclude() actually registers the script.

From within your .aspx page, you can call this JavaScript function after the user leaves the e-mail field by doing something like this:


<asp:TextBox ID="txtEmail" runat="server" Width="265px" onblur="isValidEmail(this)"></asp:TextBox>


Note: The first parameter of RegisterClientScriptInclude() accepts a type object which it uses to uniquely key the registered script. The MSDN documentation samples for this method use a call to this.GetType() to get the current page type dynamically at runtime–however, this can be a problem if you ever subclass your web page. The call to this.GetType() will return a different class than the class in which this code is actually defined. I’s best to specify the actual type of the page itself by doing something like this:



In this example, pgOrders is the actual type of the page in which the JavaScript is being included. This works better, because you are statically typing the reference to the page at compile time rather than dynamically determining the type of the page at runtime.


Kevin McNeish
Chief Architect MM .NET Applicatoin Framework
INETA Speaker

Last Updated: 10/3/2009