Category Archives: Rant

The stuff worth ranting about

WARP, UltraWebGrid and ScriptManager glitch in IE6 and IE7

This is probably a very obscure situation, but it happened to me, it could happen to someone else. Scenario: an ASP.NET page with Infragistics UltraWebGrid inside of a WARP panel. A button outside the WARP serves as a trigger for partial postback. First click on the button causes expected partial postback, but on the second click page does full postback and is screwed after that. The issue happens only in IE6/7, page works correctly in IE8.

Another condition – page contains ASP.NET AJAX ScriptManager control with ServiceReference path pointing to an ASMX WebService.

Turned out the issue was caused by project being left in debug mode (in web.config debug=”true”). Which caused WebService page to be loaded with parameter “jsdebug” in query string. Which apparently IE6 and 7 didn’t like very much. Switching to debug=”false” in web.config solved the problem.

IE8 Idiotic Session handling

As you may be aware Internet Explorer 8 will share session among its different instances (even if you start new instance by clicking IE Desktop icon). Why on Earth this was done is described in this article. The only way to start a new session is to use obscure File -> New Session option in menu, interesting choice, considering that in IE8 menu is hidden by default.

But this is not the end. Quoting the article:

Relying on closing the window to clear the session is not a recommended way to implement proper logoff for an application. Because this clearly will not work if there is another window that is sharing the session.

True, buy why, pray say, session isn’t cleared for one application if its window closed, but another window remains open, pointing to a completely different application, on different server in different DOMAIN?!

Do try this:

  1. Login to any app that that requires user login.
  2. Open a new browser, and point it anywhere to a completely unrelated link.
  3. Close original app window from Step 1.
  4. Open new browser window and go URL of app from Step 1.
  5. Surprise, surprise, you’re still logged on.

Also, aren’t  they aware that 99.9% of all users will simple close browser window instad of going thru logout process even if it takes only one click? And in many scenarious, including one above user will stay logged in.

UltraWebGrid in Infragistics 9 displays default column captions.

Recently I upgraded an ASP.NET project from ancient 6.3 version of Infragistics to current (at the moment) 9.2. Suddenly UltraWebGrid control began to display an unpleasant effect – columns that used to have no caption now showed what appeared to be default captions:

New look of UltraWebGrid

Looking at grid’s HTML markup I noticed that it set the caption to an empty string (showing code for one column):

<igtbl:UltraGridColumn HeaderText="">
   <Header Caption="">
   </Header>
</igtbl:UltraGridColumn>

Apparently it’s a new behavior in Infragistics 9.x to substitute empty captions with default column names. The solution is to set caption to a single space which, while invisible, is considered a real text caption and is not substituted by anything:

<igtbl:UltraGridColumn>
   <Header Caption=" ">
   </Header>
</igtbl:UltraGridColumn>

The result:

Correct look of UltraWebGrid

TNX Text Links Ads: How to automatically fill all your ad spots (including pages with 0 PR) and other tricks

TNX Corp allows you to place static ad links on pages of your site, so you can earn some profit. Unfortunately if you leave it to TNX system, automatic rate at which links are sold and paced on your site could be very slow. You can add links to your pages manually via TNX site interface, but it is only allowed if your page Google PageRank is above 0. Also manual placement can be really inconvenient and you cannot place more than 4 ad links.

Fortunately there is a solution. Continue reading →

Internet Explorer renders incorrect HTML if UserAgent string is too long

I’ve encountered a strange problem: 2 identical client machines (WinXP/IE7) were connecting to a website (running on IIS6, ASP.NET 1.1 and employing some Infragistics controls – UltraWebGrid, WebTab, WebMenu). One machine showed a perfectly rendered page, while the other displayed page with missing images and styles and JavaScript functions behaved weirdly. Also, closer examination of HTML source of the page revealed that Infragistics controls rendered very different HTML between 2 machines. Mystery.

The only difference between 2 browsers I found was UserAgent string (For quick way to check your user agent go to http://whatsmyuseragent.com/). Continue reading →

Session crossover in IE8

In IE6/7 if you open 2 independent browsers (not using “New Window” or “New Tab”) they do not share common session and you can login to, let’s say, a web mail account under 2 different users at the same time.
This is not the case with IE8. Using 2 browser (and seeing 2 “iexplore.exe” processes in task manager) if you try to login as 2 users – the second will take over the first. I guess it’s a new “feature” of the browser.
But IE8 gives you a way out, albeit not obvious one. In menu, you can select File -> New Session. This will open a new browser window with independent session.

Visual Studio 2003 hangs trying open ASP.NET project from Visual SourceSafe

If you still use Visual Studio .NET 2003 (I still do for some older .NET 1.1 projects) you may experience following situation:

  1. You have an ASP.NET Web project that is controlled by Visual SourceSafe
  2. While opening the project Visual Studio 2003 hangs, stops responding to mouse clicks and keystrokes.

Fortunately there is a quick fix to that.
Continue reading →