Monday, December 27, 2010

VS2010 and TFS credentials

VS2010 for some reason doesn't save TFS credentials if you connect to the TFS server. Under Win7 there's a trick that you can use to fix this:

Open up the user credentials (this is for Windows 7): Control Panel\User Accounts and Family Safety\Credential Manager
To the right of the Windows Credentials title is "Add a Windows credential". Click that link.
In the "Internet ro network address (e.g., myserver, server.company.com) box put: tfs
In the User name, put: DOMAIN\username (your username)
In the password, your password.

The whole description is here.

Tuesday, November 30, 2010

IE8 wrong style rendering on IIS / ASP.Net Dev server

I've ran into issues when site renders perfectly in VS's ASP.Net Dev Server on IE8, but when published to IIS, some styles are messed up. To make it even more confusing, it renders correctly when displayed locally on the web server and incorrectly when accessed from different machine.
Apparently I'm not the only one having this issue - and the solution is simple. Let IE know that the page should be rendered in correct mode.

Solution 1 - add following to the 'head' tag of the page:
<meta http-equiv="X-UA-Compatible" content="IE=8" />

Solution 2 - add this section to the web.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="X-UA-Compatible" value="IE=EmulateIE7" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>

The detailed description from Microsoft is here.