Tuesday, August 24, 2010

Updated: Visual Studio 2010 Image Library

Visual Studio 2010's icon library had a big update!Make sure you check out the new Image Library that gets installed with Visual Studio 2010. It was updated and contains many great-looking icons and images that are free to be used even in commercial software.

Link: Install the Visual Studio Image Library

144 MB of high-res icons

Source: http://blogs.msdn.com/b/visualstudio/archive/2010/03/29/tips-and-tricks-visual-studio-2010-image-library.aspx

Friday, August 20, 2010

Certified as Professional Scrum Developer Trainer

"A fool with a tool, is still a fool."

TFS is a great tool, but still it doesn't tell you how to do things. To close the missing gaps you need practices and a framework (like Scrum). Luckily, Scrum.org and Microsoft started the Professional Scrum Developer Program (PSD), which trains people in all three topics.

An ideal combination:

ProfessionalScrumDeveloper_500pxScrum + TFS + modern Practices

Additionally this will be the only official course on Visual Studio 2010 team features and Team Foundation Server 2010 autorized by Microsoft (no MOC courses).

Since this summer, I 'm certified as Professional Scrum Master (PSM) and as one of the Professional Scrum Developer Trainers (PSDT) that will be teaching the course.

ScrumDeveloperTrainer_500px

Neno Loje now is a Professional Scrum Developer Trainer 

Links:

Tuesday, August 17, 2010

Lookup .NET Format Strings

Format Strings in .NET - for easy and safe string formatting{0:N2} – N2 stands for a number with 2 decimals.

I wish I could remember all those – if you can't, look them up at:

Monday, August 16, 2010

IIS7 FTP service: How to enable/disable logging

It's easy… well, if you know where to look…

Step 1: Open "FTP Logging" settings

FTP Logging

Step 2: Click "Disable" on the panel on the very right.

image

Download Tip: Create Regular Expressions in a snap

I have almost no clue about Regular Expressions, but still I can create even pretty complex RegEx patterns in a snap and therefore can impress collegues with those (almost non-existant) skills.

How do I do that, you will ask?

Well, I use Expresso Regular Expression Tool

It's free (although you have to register after a period to receive your free registration code) and helped me a lot. Highly Recommended!

Expresso makes creating regular expressions a snap

Saturday, July 24, 2010

SOLVED: The provided URI scheme 'http' is invalid; expected 'https'. Parameter name: via

HTTPS worked, but now it complains if I change to HTTP...You receive the error message:

The provided URI scheme 'http' is invalid; expected 'https'.
Parameter name: via

… while using WCF to connect to an endpoint.

Probably you are trying to send a a username and password to authenticate although the connection is not secure (no HTTPS).

This modified binding should help:

<binding name="UserPasswordBinding">
security mode="TransportCredentialOnly">
transport clientCredentialType="Basic" />
/security>
/binding>

Wednesday, June 30, 2010

.NET Framework 4 Client Profile available through Windows Update

.NET Framework now served through Windows Update

Beginning June 22, 2010 the .NET Framework 4 is available through WIndows Update to ease deployment.

The whole framework? No, only the "light" version, so called "Client Profile", which contains the features to develop a client application, including:

Common language runtime (CLR)

ClickOnce

Windows Forms

Windows Presentation Foundation (WPF)

Windows Communication Foundation (WCF)

Entity Framework

Windows Workflow Foundation

Speech

XSLT support

LINQ to SQL

Runtime design libraries for Entity Framework and WCF Data Services

Managed Extensibility Framework (MEF)

Dynamic types

Parallel-programming features, such as Task Parallel Library (TPL), Parallel LINQ (PLINQ), and Coordination Data Structures (CDS)

Debugging client applications

It does not include (meaning you still need to install the full .NET Framework 4.0 to use those features), for example:

ASP.NET

Advanced Windows Communication Foundation (WCF) functionality

.NET Framework Data Provider for Oracle

MSBuild for compiling

Now, it's on Windows update, will it install automatically?

It depends on the Windows Update settings, "the .NET Framework 4 Client Profile is released as a recommended update that may be installed automatically on Windows Vista and Windows 7. The Client Profile is released as an optional update for Windows XP. In Windows XP, you must manually run WU and select the .NET Framework 4 Client Profile".

.NET Framework 4 Client Profile:

  • Recommended Update on Windows Vista/7
  • Optional Update on Windows XP

Full .NET Framework 4:

  • Optional Update on Windows Server 2003, Windows Server 2008 and on Windows Server 2008 R2

More Information?

Tuesday, June 29, 2010

When using Remote Desktop the keyboard layout always defaults to EN (English)

Finally there's a solutionYou…

  • use a different keyboard layout than EN (English)
  • use Remote Desktop to connect to another machine
  • the default keyboard/input language is set to EN (regardless of your user settings)

… then this is your solution:

On the machine you connect to run the following .REG file:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"IgnoreRemoteKeyboardLayout"=dword:00000001

Download: IgnoreRemoteKeyboardLayout.zip

Monday, June 28, 2010

Solution: Internet Explorer detected as mobile device

IE LogoProblem description:
"Internet Explorer redirects to mobile layout web site"
"Some websites are connecting to mobile version"
Why am I getting mobile sites? I'm using my desktop PC!
Solution: (as found in this thread)
  1. In the Windows registry navigate to the following key:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\User Agent\Post Platform
  2. Remove the entry "Creative AutoUpdate v1.40.01"
  3. Close all Internet Explorer windows.
Background:
Some websites are scanning the user agent string for the word "PDA", unfortunately the word "Update", contains PDA. Thus, those websites present their mobile versions instead.

SMTH-AUTH errors with System.Net.Mail

net_v_webIf you are getting SMTH AUTH errors while trying to send e-mails using the SmtpClient to an smtp server that requires authentication, make sure that you call UseDefaultCredentials before settings the credentials.

So, order is important here!

using System.Net;
using System.Net.Mail;
...
using (var client = new SmtpClient())
{
client.Host = "smtp.teamfoundationserver.de";
  client.Port = 25;
client.UseDefaultCredentials = false;
client.Credentials = new NetworkCredential(username, password);
client.Send(message);
}

Good luck!

Code Contracts: don't forget to turn them on

dd491992_codecontracts_project(en-us)

If you use the new System.Diagnostics.Contracts classes like

int Div(int a, int b)
{
  Contract.Requires(b > 0);
  return a / b;
}

Do not forget to download the Code Contracts tool and turn on static and/or runtime checking of your code.

Otherwise the Contract.Requires statement above will just be ignored (thus the second parameter will not be checked)…

Notes:

  • If you use Contract.Requires<TException> you will receive an assert message telling you that you need to use the rewriter
    image
  • Alternatively, leave your pre-conditions as old-fashoned if-then-throw-statements, and end them with EndContractBlock, (contract tools recognize them as legacy-require statements).
    Beispiel aus den FAQs:

    void MyMethod(Foo foo)
    {
       if (foo == null) throw new ArgumentNullException(...);
       Contract.EndContractBlock();
       ... normal method code ...
    }

Setting Attribute value in VB.NET XML Literals

ms_net_rgb_webYou the receive compile error when using XML literals and try to set an attribute using quotation marks…

Error message: "Expected matching closing double quote for XML attribute value."

Your code might look similar to this fragment:

Results in an error:

Dim output = From item In items
  Select <Item ID="<%= item.ID %>">
  </Item>

What's wrong? Just Remove the quotation marks. The <% %> syntax will insert them later.

Works fine:

Dim output = From item In items
  Select <Item ID=<%= item.ID %>>
  </Item>

The result as XML:

<Item ID="1">
</Item>
<Item ID="2">
</Item>

Sunday, June 27, 2010

Visual Studio 2010 Keyboard Shortcuts Poster

VS_h_rgb

Reference cards for the default keybindings in Visual Studio 2010 for Visual Basic, Visual C#, Visual C++ and Visual F#

Download from Microsoft: Visual Studio 2010 Keybinding Cards

image

Saturday, June 26, 2010

Unable to display feeds in Internet Explorer 7/8

internet_explorer_7_logo_thumb[7]Problem Description:
After clicking on a subscribed feed in Internet Explorer you get a message that the feed could not be downloaded.
If you run Internet Explorer as an administrator (right-click "Run as Admin") feeds are displayed as expected.
Solution:
Equipped with administrative privileges change the integrity level of your feeds folder (located under %LOCALAPPDATA%\Microsoft\Feeds) to low by typing:
icacls feeds /setintegritylevel (OI)(CI)low
Related posts:

Wednesday, June 2, 2010

Maximum database size in SQL Server

sqlserver2008logo There's a limit for everything: do you know the maximum database size supported by SQL Server (32 and 64-bit)?

Well, no reason to panic. It's 524,272 terabytes (although a single database file is limited to 16 terabytes of data).

Further reading:

Northwindow database as OData service

The famous Northwind database is now available as WCF "OData" service from the web:

http://services.odata.org/Northwind/Northwind.svc/

Thursday, May 13, 2010

Disable Java update notification

As described here and here, this is what you need:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Update\Policy]
"EnableJavaUpdate"=dword:00000000
"EnableAutoUpdateCheck"=dword:00000000

Thursday, April 15, 2010

Configure Windows Server to sync time with Internet Time (NTP) servers

The clock of your Windows Server is not automatically synced with internet time servers.This guide knows how to do it:

  • "Note that you don't want to do this on a computer (PC or server) that is part of a domain, as this computer should pick up time from the Domain Controller.
  • You should do this on the domain controller itself though. The DC, in turn, will hand out the correct time to the rest of the computers."

The .REG file:

Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters] "NtpServer"="pool.ntp.org" "Type"="NTP" [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient] "SpecialPollTimeRemaining"="pool.ntp.org" "SpecialPollInterval"=dword:00000e10

Download: TimeSync.zip

After restarting the Windows Time Service

net stop w32time

net start w32time

You can check when the last time synchronisation happend using

w32tm /query /status

Tuesday, March 30, 2010

Turn off automatic machine account password changes

Windows Server automatically changes machine account passwords every 30 daysBy default, Windows Server automatically changes machine account passwords every 30 days.

You can change the behavior and turn this off by following the procedure documented in Microsoft KB 154501.

The .REG file looks like this:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Netlogon\Parameters]
"DisablePasswordChange"=dword:00000001

Download: DisablePasswordChange.zip

(Thanks to Dominic Hopton for this hint.)

Enabling the Hyper-V role on Windows Server 2008 R2 causes a blue screen after restart

Be careful when using Hyper-V with modern high-end graphic cards
Resolution (found in Microsoft KB 691661):

When you enable the Hyper-V role in Windows Server 2008, do not install the drivers for high performance accelerated graphics adapters. This behavior will not occur when you use the Vga.sys or Vgapnp.sys generic video drivers that are included with Windows Server 2008. To revert to the generic video driver, you can uninstall any high performance vendor-specific video driver.

(see also what Virtual PC Guy has to say about this)

Wireless Network Adapter not working in Windows Server 2008 R2

Symptoms:

  • No wireless networks are shown.
  • You have a wireless driver installed.
  • Windows device manager says the device is working properly.
  • Intel Diagnostics says the wireless adapter is not present or disabled.

This is by design.

Solution:

  1. Add a feature called "Wireless LAN Service" using Server Manager.
  2. Done. :)

(Thanks to Farrukh Lala for the tip.)

Searching files in folders defined in PATH

And easy way to do this is using the "where" command:

C:\>where reg.exe
C:\windows\system32\reg.exe

Refernce:

WHERE [/R dir] [/Q] [/F] [/T] pattern...

Description:
    Displays the location of files that match the search pattern.
    By default, the search is done along the current directory and
    in the paths specified by the PATH environment variable.

See example:

WHERE command in Windows 7

(Thanks to Cameron Skinner for this tip.)

SQL Server: How to remove a file from a file group

Solution:

  1. How to remote a file from a SQL file group Empty the file by using the Shrink function
    (it will copy the content to other files in the same file group).
  2. Remote the file from the database files.

How to invoke the context menu using the keyboard of my Dell E4300?

shortcut-menu-key On some laptops the “menu key” (to open the right-click context menu) is missing.

As a workaround you can also press [Shift]+[F10].

How to change the expiration date of certificates that are issued by a Windows Server 2008 CA

WindowsServer2008

You want to increase the validity period of your certificates issued by a Windows Server Certificate Authority (CA).

Solution:

Follow the steps in Microsoft KB 254632.

This also works with Windows Server 2008.

Network Connections list empty after installing Acronis Backup & Recovery 10

Symptoms:

Network Connections are not displaying anymore after installing AcronisThe list of Network connections is blank after installing Acronis Backup & Recovery 10 on Windows Vista/Server 2008 x64.

Cause:

Installation of Acronis Agent incorrectly modifies permissions for the DCOM netman service and changes its configuration in the Windows registry.

Solution:

Follow the steps in Acronis KB 2980 and restart machine.
(Thanks to Acronis for resolving this!)

Error message: "Invoke or BeginInvoke cannot be called on a control until the window handle has been created" when Installing SQL Server 2008

Applies to: SQL Server 2008 on Windows 7/Server 2008 R2
Error message:
sqlserver2008logoInvoke or BeginInvoke cannot be called on a control until the window handle has been created.
(as described in Microsoft KB article 975055)
Workaround:
"Generally, if you just rerun it won't hit the issue again." (Source)

Hyper-V admin console: The computer 'localhost' failed to perform the requested operation because it is out of memory or disk space

Error message:

Cannot manage my Hyper-V machines anymoreThe computer 'localhost' failed to perform the requested operation because it is out of memory or disk space.

Workaround:

Locate and kill the running "WmiPrvSE" process.

(Thanks to sAnTos for the tip).

 

Event ID: 7026: The following boot-start or system-start driver(s) failed to load: storflt

Message:

storflt is only needed on Hyper-V virtual machines. Log Name:      System
Source:        Service Control Manager
Event ID:      7026
Level:         Error
Description: The following boot-start or system-start driver(s) failed to load: storflt

Resolution:

This event can be safely ignored.

Source & further information: KB 971527

Unable to edit DCOM settings for IIS WAMREG admin service on Windows Server 2008 R2

If you try to fix…

Event ID error messages 10016 and 10017 are logged in the System log after you install Windows SharePoint Services 3.0
(KB 920783)

WS08-R2_v_rgb_m… you will notice that you cannot change any settings in Component Services and all controls are greyed out. This is by design.

Workaround:

  1. Take ownership of the registry key HKEY_CLASSES_ROOT\AppID\{61738644-F196-11D0-9953-00C04FD919C1}
  2. Add permissions for you to edit the key (Full Control)

(Thanks to Wictor Wilén for the tip.)

How to hard reset a NOKIA cell phone

Same code to hard reset all Nokia cell phones Type *#7370#

Be aware:

  • All data and settings will be lost.
  • The device will revert to factory settings.

Note: The default security code for your Nokia device is 12345.

Monday, March 29, 2010

Where is the Wireless Switch on a Dell Latitude E4300

The Next Corner knows where it is:

"on the Dell Latitude E4300, the wireless switch is located on the right side of the laptop, just under the only USB port of the machine. See picture of the Wireless Switch below:"

Saturday, January 30, 2010

Solution for: "Cannot open TWAIN source" (Canon)

24.01 Error message:

  • "Cannot open TWAIN source"

Affected products:

  • Canon scanners like the "CanoScan LiDE 60"

What does not hep:

  • Updating/reinstalling CanoScan toolbox or drivers
  • Trying other USB ports

Workaround/Solution:

  • Shorten your "PATH" environment variable. If the resulting variable is "too long", the TWAIN error will occur. After shortening the path, scanning will immediatly work (no restart required.)

(Thanks to “Graf_d” from this thread for providing the solution)