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.

Wednesday, February 25, 2009

Dev Tools

I stumbled upon interesting list of tools for developers : 20 Must-have free tools
I actually agree with most of the list, but have 2 interesting which i'm going to check out soon:
1) Doxygen - for generating documentation
2) KDiff - code merge tool as i'm still not completely happy with DiffMerge
Oh, and Pixy has released new version of his online Color Scheme Designer - priceless!

Monday, September 15, 2008

WPF - the pain!

As i'm struggling my way through the first WPF application, I keep running into interesting reading (essential really) which seems to be a must for a WPF virgin like me.
A Guided Tour of WPF is priceless, also his article on dependancy properties provides excellent view and i'm sure there's more to explore...
Since i'm struggling with trying to bind ListView to a collection of objects (piece of cake) and also to group the items (pain in the b*), i'm forced to actually try and learn the basics :) There's a very nice article on WPF Data Binding on CodeProject.
Once i figure out the bloody groupping thing, i'll post the sample code here.

Friday, September 12, 2008

Diff tool for C# source code (Part 2)

I'm back with more information on the diff tool for VS (2005) and TFS (2005).
I've decided to use DiffMerge. It may be just me, but I like it better. It's still nowhere as good as Araxis, but since it's free, i shouldn't complain i guess :)

To set up your own diff tool in VS 2005: Tools -> Options. Select Source Control > Visual Studio Team Foundation Server and click Configure User Tools... Then click Add... and specify:

Extension: cs

Operation: Compare
Command : %path to the diffmerge.exe%
Arguments: %1 %2

Obviously, you can do the same for vb, resx, etc...

Now, IMPORTANT thing. This DOES NOT REPLACE THE COMPARE TOOL USED FOR CHECK-IN, which imho totally suxs. So, you need to identify all conflicting files first, then select them one by one e.g. in the solution explorer and click Compare (right-click menu item). This is where the specified Diff tool is shown and you can modify your source prior to checking them in. On check-in, you then select Use Local Version. Make sure that the file didn't get changed on the server in the mean-time though!

ClickOnce Error : Value does not fall within the expected range

I've ran into an issue while releasing application using ClickOnce. The application got downloaded successfully on the client, but then it failed during deploy with the "Value does not fall within the expected range" error.
The issue is that ClickOnce doesn't support having the same application version twice on the machine. In our case, i first installed a "Test" version (different ClickOnce deploy folder) to make sure the app works as expected. Then i did deploy to live ClickOnce folder and tried to run the app on the same computer. The "Live" version exhibited the above error.
Solution is: increment the live version, problem solved.

Friday, September 05, 2008

Diff tool for C# source code

The diff tool which is part of VS 2005 (TFS) is very basic and any complex diff is impossible to resolve in it.
This page has a nice list of tools available:
http://codebetter.com/blogs/patricksmacchia/archive/2008/04/28/diff-tools-to-see-source-files-changes.aspx

I used to use Araxis long time ago and it was brilliant. I'll check out WinMerge and DiffMerge now to see if free tool can do the trick. Will post more info here once I'm done evaluating.

Wednesday, July 02, 2008

SQL 2005 32 bit on Vista 64 bit

I've decided to upgrade my work system to Vista 64bit (mainly due to larger memory). As I go on installing stuff, i keep running into various issues which I'll try to post here.
SQL 2005 Developer Edition (32 bit).
First issue is with the compatibility check-list - namely IIS and ASP.Net

This KB article outlines which features need to be turned on Vista in order for Reporting Services to work.

This link describes how to fix ASP.Net by running following:
cscript %SystemDrive%\inetpub\AdminScripts\adsutil.vbs set w3svc/AppPools/Enable32bitAppOnWin64 1