Category Archives: Uncategorized

VS2012 – Proxy Authentication error when connecting to Team Foundation Services

If you are behind a Proxy server that requires authentication, you might receive a ‘407: Proxy Authentication Required’ error when trying to connect to Team Foundation Services.

In VS2010, you could work around this by opening the ‘start’ page in Visual Studio and enter your credentials when prompted, but this doesn’t work in VS2012.

For VS2012 follow the steps below:

  1. Go to Tools – Extensions & Updates
  2. On the left-hand menu, click ‘Updates’
  3. Click the link to enter your credentials
  4. Close the extension manager and connect to TFS.

Adding a ‘self’ linked SQL Server (SQL Server R2)

To mimic a multi-SQL Server environment of one of our clients on a single server, I needed to link the SQL Server to itself. If found several suggestions by googling it, but only this one worked for me:

EXEC sp_addlinkedserver @server=’alias’, –the name of the linked server
@srvproduct=”,
@provider=’SQLNCLI’,
@datasrc=’.’,–the data source
@provstr=’Integrated Security=SSPI';

The other suggestions I found, used the same approach, but with a different provider. SQLNCLI worked for me.

Missing intellisense for aspx / masterpages in Visual Studio 2010 / SharePoint 2010 Projects

I’ve been working recently on a SharePoint 2010 project that I inherited from a colleague, and some of the aspx pages and the .master page did not have any intellisense, which was pretty annoying.

I’ve found this blogpost from Sanna Pehkonen, which states to simply open the page using the ‘View Markup’ option in the solution explorer (right click). And behold… intellisense is working again.

Update: Windows Search and Xml files (on Windows Server 2008)

A while ago, I wrote a blog post on how change how Windows indexed xml files (see: http://blog.sdbonline.com/2011/09/windows-search-and-xml-files.html)

The idea is to let Windows index Xml files as Text files, allow you to search on Xml element tags and attribute names (instead of only element values and attribute values):

Navigate to HKEY_CLASSES_ROOT\.xml\PersistentHandler and change the default value to {5e941d80-bf96-11cd-b579-08002b30bfeb}

See my previous post for a more detailed explanation

This works for Windows 7 and Windows 2008 (R2) (and also on Windows Vista), but for Windows Server 2008 (R2), you will need take a few additional steps:

Add the ‘File Service’ Role if not already added

Add the ‘Windows Search Service’ in the ‘Role Services’ of the ‘File Service’ Role.
Select the locations to index (this can always be modified afterwards)
Modify the registry and rebuild the index
Verify that xml files are now indexed using the ‘plain text filter’
go to ‘Control Panel’ – ‘Indexing Options’. Click advanced, and on the ‘File Types’ tab, verify that the xml extension is using the ‘Plain text Filter’
Make sure to wait for the indexer to complete: on my last test, my test file (in the root folder of my drive) didn’t get indexed until the end
Once completed, you can search for all the content in an xml files as it was a text file (e.g. element tag names will be found)
Note that you can do the same for other file type (e.g. xslt, xsl, …) by modifying the registry for those file types

HKEY_CLASSES_ROOT\\PersistentHandler

and set the default value to {5e941d80-bf96-11cd-b579-08002b30bfeb}

SQL Server 2005 ‘Login failed’ (error 18456 state 16)

The event log of one of our SQL Servers filled up with events 18456 (every minute).

Failure Audit: Login failed for user ‘\’. [CLIENT:]

Looking in the SQL Server log, I found some extra information.

2011-10-18 12:52:00.55 Logon       Error: 18456, Severity: 14, State: 16.

I found this MSDN blog post, explaining most of the State codes, except for state 16.

ERROR STATE

ERROR DESCRIPTION

2 and 5

Invalid userid

6

Attempt to use a Windows login name with SQL Authentication

7

Login disabled and password mismatch

8

Password mismatch

9

Invalid password

11 and 12

Valid login but server access failure

13

SQL Server service paused

18

Change password required

Digging a little further, I found that State 16 usually means that the target database cannot be located. I most cases, this is due to an SQL Server Job that targets a deleted of offline database.
Deleting or disabling the job gets rid of the errors in the event log.

Update Mango Beta 2 to RTM without restoring to NODO

Apparently, it’s possible to update your Windows 7 phone with the Mango Beta 2 installed to the RTM version of Mango without having to restore the NODO backup (and loosing all you have done since). Just update Zune to version 4.8, connect your phone and you will receive 2 updates. see http://forums.create.msdn.com/forums/t/92311.aspx

Forcing your Windows Phone 7 to update

Microsoft recently release the ‘March 2011′ (aka NoDo) phone update. Unfortunately, not all phones are updated at the same time. An update schedule has been posted here: http://www.microsoft.com/windowsphone/en-us/features/update-schedule-world.aspx

If your phone is listed under ‘Delivering update’, you can ‘trick’ the Zune software & your phone to get the update anyways.

1. Start Zune on Your PC
2. Turn off Data connection ( Setting >System > Mobile Network > Data Connection ) and Wifi ( Setting >System > WiFi ) on the Phone
3. Connect the Phone with the PC (via USB)
4. Start the update search in Zune ( Settings > Phone > Update )
5. About 3 seconds later, disconnect your PC from the internet (Turn WLAN off)
6. Zune finds NoDo-Update. Press OK
7. Connect to the internet again on your PC and install the update

Worked like a charm for my phone (HTC Throphy)

The full story here & here

“Unable to connect to SQL Server Instance” when installing SCVMM 2007 R2

When you try to install System Center Virtual Machine Manager 2007 R2 and configure it with an existing SQL Server installation, you must have named pipes enabled on the SQL Server. If named pipes are not enabled, you will receive the following error:

setup cannot connect to the specified sql server instance

Also, when using a SQL Server 2008 installation, you must install the SQL Server 2008 Native Client and SQL Server 2008 Command Line Utilities on the SCVMM Server. Both can be installed from the SQL Server CD or downloaded from http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en

Running remote desktop on a Windows Server Core 2008

I am currently investigating on running hyper-v server on my development machine. The main reason is the low footprint. However, as it turns out, it is not possible to ‘connect’ to the VM’s hosted on the hyper-v server from the core box itself, as the terminal services component (aka remote desktop) is missing from the Server Core.

According to Jason Hutt’s post at http://jasonhuitt.com/blog/post/Server-Core-2008-No-Built-In-MSTSC.aspx you can add the TS functionality to a Server Core box by copying the following files from a Windows Server 2008 or Vista SP1 machine

  • \Windows\System32\mstsc.exe

  • \Windows\System32\mstscax.dll

  • \Windows\System32\en-US\mstsc.exe.mui

  • \Windows\System32\en-US\mstscax.dll.mui

    I have not tested this yet, but will update this post as soon as I do.