
Back to Blog index.
If you are using Microsoft Visual Studio 2005 and would like to use the Performance Explorer that is part of the Team Editions (Team Edition for Software Architects or Team Suite), you can open the Explorer by choosing the View/Other Windows/Performance Explorer menu command. However, sometimes this menu command goes missing (disappears altogether) or choosing it gives you an error message or simply does nothing. If this is the case, you have a problem!

Now, how would you fix this situation? The best bet is to try to close Visual Studio, and open the Visual Studio command prompt from the Start menu. From here, you can start the development environment (DevEnv.exe) with a special command-line parameter called /ResetSkipPkgs, which clears the list of badly behaving packages. You see, sometimes Performance Explorer can cause trouble, and thus Visual Studio black-lists it. Using this parameter when starting Visual Studio gets is up and running again. Thanks for AH for the tip!
If you are using the .NET 2.0 DetailsView component in your ASP.NET web applications for example with C#, then you might wish to change the default view of the component from the record view to the Edit or Insert views. How do you do this?
Luckily, it is very simple: the control has a property called DefaultMode, which you can change to your liking. But you have to know that such a property exists. The available options are DetailsViewMode.ReadOnly, DetailsViewMode.Edit and DetailsViewMode.Insert. Pretty self-explanatory.
I had to transfer some files through FTP to a Windows Server 2003 box, but since Internet Explorer (IE) is set to an enhanced security configuration, you cannot download files to your server by default.
Of course, by adding your FTP site as a Trusted site will fix the problem, but the reason I want to blog this is that I didn't find any 100% hits for the error message with Google.
So here goes. If you get the error message "Your current security settings do not allow you to download files from this location." from IE when downloading files in Windows Server 2003, add your FTP site to the list of Trusted Sites. Microsoft Knowledge Base article 182569 also helps.
Borland has today announced the latest version of its SQL RDMBS, called InterBase 2007. This is an interesting little SQL database, that has had an interesting support for transactions for a long time. Similar solutions have only just recently started to appear on more mainstream, big databases like Microsoft SQL Server.
I've always been a fan of InterBase, since it is easy to use, robust and performant for smallish installations. Plus, it is competitively priced, of course today one can get both Oracle and SQL Server for free.
The new version introduces journaling support (a transaction log file), better backups and batch support for SQL, and native Unicode database strings. On the lacking list I'd put the need for better management tools, better documentation and native OLEDB driver for .NET use. I don't want to use BDP.NET to access the thing.
The latest issue of MSDN Magazine has an interesting introduction to Windows Presentation Foundation and its main UI controls. I'm absolutely loving to see nicer UIs in my application, but WPF isn't an easy beast to tackle. I've tried to build simple applications, but I don't yet understand the even model fully. More to learn, that is.
You've written a simple ASP.NET 2.0 application with C# that uses an Microsoft Access database through the usual ADO.NET OLEDB drivers. Your .MDB database is in the App_Data special folder, and you have copied your web application to a Windows Server 2003 computer. Your application works fine on the first look, but fails with the error message "Operation must use an updateable query." when you try to update your database for example with an SQL UPDATE or INSERT statement. What the heck?
Well, if you've been working with latest Microsoft platforms, you will soon guess that this is some kind of security problem, and indeed it is. So how do you fix this error?
To get rid of the error, you need to give more permissions to your App_Data special directory. The easiest way to do this is to launch the Internet Information Services Manager for your IIS 6.0 installation. Then, browse to your web site and the correct App_Data directory, right-click it and choose Permissions. You will see the following dialog box:

Since by default in Windows Server 2003 your ASP.NET worker process will run as a NETWORK SERVICE, you need to give this group both read and write rights to the directory (and thus the .MDB database file as well). That's it.
Oh, Microsoft Knowledge Base has an article with ID 175168 that also discusses this problem.
eWeek has listed the "top 10" of programming languages one should learn based on their popularity in companies seeking programmers. Of course, everybody has their opinion when it comes to what everybody should do or learn, but it is interesting to see AJAX listed as a programming language. Huh? Other than that, the usual ones like C, C# and Java are listed. Why list so many scripting languages on the top 10? That escapes me as well.
I've always been an Intel type of guy, and I'm yet to use a PC with an AMD processor. I've never felt I'd need one. Now, this doesn't mean that AMD would be bad, in fact their presence in the market does many good things. One example is their development resources, which I didn't know even exists.
Now, (at least) two interesting .NET related articles have been published, and the first is about building 64-bit .NET applications with Visual Studio 2005. The second one is titled "24 Considerations for Moving Your Application to a 64-bit Platform", and is available from DevX. Who would have known I would some day go to AMD for development reading?
More Vista stuff. I was today testing Microsoft's new child when I noticed I still miss the ability to "SendTo" to Notepad -- that is, I often have the need to view files inner contents with a text editor. In Windows XP, the SendTo folder (where you would store the shortcuts to those applications you want to appear in the Send To popup menu) can be quite easily found, but with Windows Vista beta I was stumped.
Luckily, the search functionality (which is getting better day by day) gave me the answer. The new path is:
C:\Users\MyName\AppData\Roaming\Microsoft\Windows\SendTo
Well, would you have guessed? I didn't.
A good night's sleep or two can do miracles. On Friday, I wrote about my installation trouble with Windows Vista RC 1, but today I got Vista working in VMware. The problem was (and is) corrupted screen during boot time, but once I used the VGA graphics mode to install VMware Tools onto the virtual machine, I got nice graphics back to Vista.
However, when the operating system is loading, I cannot see a thing on the black screen except a corrupted image that resembles lines and maybe some text. Reminds me of DOS programming times when I wrote directly to video memory, but messed up with pointers.
I stumbled onto Windows Vista Release Candidate (RC1) installation trouble today with both VMware Workstation 5.5.2 and Virtual PC 2004 SP1.
Firstly, VMware would not let me even start the installation, since the virtual machine froze before the installer started. A fellow MVP pointed out that this was an issue with VMware Workstation, and could be fixed by putting the following two lines in the .VMX file:
svga.maxWidth = "640" svga.maxHeight = "480"
Of course, this option is less than optimal, since it limits the screen resolution to plain ol' VGA level (640x480x16). Not good, so I ended up installing Virtual PC 2004 SP1. But, even though I tried downloading the ISO images for Vista twice from MSDN, I always ran into the error 0x80070570: the file "D:\Sources\install.wim" is corrupted. But according to a TechNet forum post (or rather, posts), I can judge I'm not the only one with the problem. Of well, looks like I'm gonna miss RC1 testing altogether.
If you need to detect an Intel multi-core CPU correctly in native (Win32) code, here's the source code in C++ directly from Intel.
ScottGu reported on his blog yesterday, that the ASP.NET AJAX extensions, formely code-named "Atlas", will in the future be simply called the "Microsoft AJAX Library" (on the client side). A no-thrills name this time.
MSDN Magazine has an excellent article about concurrency in the .NET world. Above other very interesting things, the article provides a comparison of the performance hits of using various locking objects, like critical sections, mutexes, monitors, and so on. Before, I've only had a hunch or gut-feeling of these differences, but I haven't before seen raw numbers.
Recommended reading!
If you have been using C# 2.0 and Visual Studio 2005, the chances are you've heard about "settings". When you add a "Settings.settings" XML file into your WinForms project, and visually edit the values, your application can generated Properties.Settings.Default object to access those properties at run-time.
When using this feature, you might have noticed that also the file App.config changes. And somehow, the contents of this file becomes the YourApp.exe.config file in your project's Bin directory. How does the App.config magically become YourApp.exe.config?
This is something I haven't noticed officially mentioned anywhere byt Microsoft, so I decided I'd give a short summary. Since Visual Studio 2005 uses the MSBuild engine, it is is a ready-made task for the C# compiler that does this file copying for you automatically.
If you go to your project's properties in Visual Studio and enable verbose logging of build events, you can see that a MSBuild target called _CopyAppConfigFile is listed in the log. This is exactly the instruction that copies App.Config to be your application's config file. For example:
copy /y "App.config" "bin\Debug\ConsoleApplication1.exe.config"
Mystery solved!
I've just spent the last four days in an 400-level Visual Studio 2005 Team System training here in Helsinki. Excellent course, thanks AJ!
There's lot to learn in the product, but also lot to love. I'm impressed with the integrated Team Foundation Server (TFS) based source control.
Borland has today announced that their new Turbo products are now available for download. Cool!
They also have pricing information available, here in Europe all Turbo versions cost 399 € without taxes. Of course, the Explorer versions are free.
I've been using Microsoft Word professionally for years (currently I'm using Office Word 2003), but still there are new keyboard commands in it that I wasn't aware of. Microsoft has compiled a very nice list of these keyboard shortcuts on the Office web site, and the new ones for my in this list were:
Which one of these were new to you?
The Delphi Magazine (TDM) has just published my Windows Vista article with the title "Getting Ready For Windows Vista". It is available in the September 2006 issue (or Issue 133), so go grab a copy.
TechNet has a new Vista jump page available titled "Reliability and Performance". From here, you can find additional links to information about Vista's enhanced diagnostics capabilities, faster booting time, and so on.
Microsoft has today made available the first Release Candidate for .NET Framework 3.0. I'm impressed, I didn't think they could make it for Vista, but it sure looks like so *if* this RC is of good quality.
Personally, I'm waiting for the new Windows Vista RC 1 to become available so that I can test both at the same time. The web version of Expression should also become soon available.
› Blog Archive