Carlo
-
-
A story of gflags and the crashing Notepad
As you can imagine, being able to reproduce a problem on a machine you can put your hands on is the best thing to troubleshoot and resolve it, so as I guess almost all my colleagues in CSS I quite often install on one of my machines the test apps I got from customers, or make experiments to confirm/deny a theory I have… this is how this story begun. A while ago, on my Vista x64 machine notepad.exe started to intermittently fail to load and the only “visible” symptom (of course apart the fact that Notepad was not showing up) was a very quick command prompt but unfortunately the content was impossible to read, and I had nothing in the Event Log or any other “obvious” logs. I noticed this problem because the CRM tool we use to track our work on support cases, offer the possibility to review the entire log of a call in notepad, and every now and then I happen to use that function if I want to have a quick recap of what has been done so far, specially if I got the case from another Engineer and I’m not fully aware of all the…
-
Cool File Manager: Servant Salamander
I started to use this tool almost 6 years ago, in my previous life before Microsoft because it was quite widely used in my former Company; at the beginning I didn’t like it very much, I was used to Windows Explorer and at that time the Salamander’s capabilities where not as refined as they are in the current version. But since I’m quite curious I decided to for with it for a while as an experiment, and guess what? I’ve never returned back from that experiment and to Windows Explorer đ. As the time and releases went by, new features where added (and still more are being developed), the user interface refined and performance and reliability improved… So, what I like most of this tool? Well, quite a few things, actually… I’m a keyboard shortcut addict, and almost anything you can do with the Salamander has a shortcut key (and this is probably it main strength, in my opinion) The two resizable panels have easily customizable views (Brief, Detailed, Icons, Thumbnails etc…) You can browse your File System, your System Registry, open and navigate archives (like .zip, .rar etc…), ISO files and more inside the panels, like if you are still…
-
If an EventHandler is called twice…
…take a close look at your code đ. This comes from a case I worked on in the last couple of days: a customer reported a problem in one of his ASP.NET 2.0 pages, which is meant to perform some sort “long running” operation on the server. What puzzled me a bit (well… quite a bit, at the beginning) is the fact that after the user clicked posted the page (clicking on a submit button) and the long operation begun on the server, after about 90 seconds they noticed a new click button for the submit event was fired, thus restarting the whole “long” operation (and of course leading of all sort of problems this implies for the application’s logic). Doing some tests we found that more that the above, even if he closed the browser on the client immediately after submitting the form, after about 90 seconds they still got a second click event firing for the submit button! đ˛ Of course if the browser is closed on the client, it’s hard to believe that the new click and subsequent post is coming from the user… đ We looked and the page source produced by the server, here is an interesting excerpt: <input type="button"…
-
CSSVista and IE Developer Toolbar to easily customize how your site/blog looks
While working to customize a bit my blog (and you can easily see I’m not a graphic designer! đ¤) I struggled trying to understand and sort out the tangle of CSS styles I can override to change how these pages look (at this is still “work in progress”). Luckily in our internal blogger discussion list someone (don’t remember exactly who, sorry…) suggested to use CSSVista, a cool tool which allows you to edit your CSS styles and have a “live” preview of what the results are. If you use this in combination with the IE Developer Toolbar, which allows you to easily inspect the DOM in your page and find which CSS style is applied to every element (among many other things you can discover with the toolbar) and with some experience with CSS editing, it should not be that hard to restyle your page. The only problem left is how it will look like at the end… đ¤đ (I definitely need some graphic advices…) Cheers
-
New hotfix for ASP.NET 2.0 (CS0006 & FileNotFoundException)
I recently worked with Jerry and Doug on a sporadic problem reported by a customer (Compiler Error Message: CS0006: Metadata file ‘C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\<path>\<assembly>.dll’ could not be found), and doing some researches I found they were already working on a fix for this problem (and a couple of other ones related to the same code area). I sent the private fix to the customer for testing in his real (non production!) environment, and after he confirmed the problem was solved without side effects, the Product Team went ahead and produced the final fix. Here are the error messages: Exception message: Could not load file or assembly ‘<assembly>, Version=<version>, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified Compiler Error Message: CS0006: Metadata file ‘C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\<path>\<assembly>.dll’ could not be found System.InvalidOperationException: The resource class for this page was not found. Please check if the resource file exists and try again Typically you get those errors when the application is running under high load (but that may not only be the only case), and the workaround to resolve the situation is to clear the Temporary ASP.NET Files folder and/or restart the application pool. The KB article for…
-
Session_OnEnd not firing after applying Windows 2003 Service Pack 2
We very recently discovered a bug in classic ASP (asp.dll) you get installing the Service Pack 2 for Windows 2003; removing the SP2 makes it work again as expected, so this is a regression bug introduced by the service pack itself. Basically with SP2 installed, the Session_OnEnd() method in classic ASP is not fired anymore, thus breaking all applications which rely on that event to run cleanup code. We already have some reports from customers, either directly to CSS or in Newsgroups. I know my colleagues are already well on this, a private fix has been produced and is being tested internally (as far as I know it works) and we are writing a KB article to document this. The process is still ongoing so I don’t have (and can’t give you) further details on this, but I guess it’s a matter of days before this will be publicly available; of course I’ll update this post when we’ll have the KB available. Update (03/04/2007)The KB article is still a draft and not public yet (should be released soon, anyway) but the fix is ready; you can get it calling CSS and ask for the hotfix #934903. Update (17/04/2007)The KB article has been published: http://support.microsoft.com/default.aspx?scid=kb;EN-US;934903 …
-
Charting in ASP.NET (alas: GDI+ not supported in a service)
A few weeks ago we had an interesting discussing in my team (triggered by a customer’s request for some hints on charting in ASP.NET) about the use of GDI+: here is what the documentation states on the subject (and what spurred the customer on opening a Service Request with CSS): Classes within the System.Drawing namespace are not supported for use within a Windows or ASP.NET service. Attempting to use these classes from within one of these application types may produce unexpected problems, such as diminished service performance and run-time exceptions. (from http://msdn2.microsoft.com/en-us/library/system.drawing.aspx) Just to clarify: they were not experiencying any particular problem and you can go with GDI+ if that workes fine according to your requirements, but the statement above means that CSS can’t help you if you are running into troubles with it… Customer concern and question: Searching the internet, most of the samples for ASP.NET applications providing charting work with GDI+; there are even books on this topic. Why Microsoft is not supporting GDI+ in ASP.NET? If we want to build charts on our own, what design can we use which Microsoft DO support? Well… GDI+ ins’t supported from a service because those components/classes where not designed/tested to run without an interactive desktop in a…
-
Advanced ASP.NET 2.0 and deep dive Ajax training
Last week I attended an advanced ASP.NET 2.0 training with deep Ajax dive in our sub in Munich; for my convenience I flew in on Monday morning (I had to wake up at 4 a.m. to go to the airport đ¤), jumped on a S-Bahn train to the station of Lohhof and after that I had almost no idea where to go exactly because that was my first time there, but right out the station there is a nice road sign indicating “Microsoft –>” đ, and then signed-in right on time for the first day start. It was a Develop Mentor training set up just for us CSS Engineers (well, actually the only 5 attendants are all from my virtual team đ˛); the weather in Germany has been quite bad, lots of rain and icy wind (I actually got a cold with a temperature, a cough… all the stuff đ¤), all the hotels in town where full because of some kind of industrialists meeting (not exactly understood what) so I had to accept the only with some rooms available… not a good experience for my first time in Germany, but at least the training was well worth all of those troubles!…
-
Watch out your Web Events!
In ASP.NET 2.0 we have a new powerful monitoring feature called “Web Events” which help keep track of important events happening during your application’s lifetime, such as the application is starting, is stopping, it has been recompiled, exceptions etc… Web events are consumed by providers (listeners), which read the information packaged with the event and then record the information. Each provider is written to record the Web event data in a different way. For example, one provider might write to the Windows event log, while another might send an e-mail message. We have several built-in Web Events and 3 Providers available, and of course you can build your own using the classes provided in the System.Web.Management namespace; however there are only two events enabled in the rules element: All Errors and Failure Audits. Both are enabled and are subscribed to by the EventLogProvider. In it’s simplest form, for example, you can tell ASP.NET to make an event log entry each time an application starts or shuts down by adding this to the <system.web> section of the web.config file for the application: <healthMonitoring enabled="true" heartbeatInterval="0"> <rules> <add name="Lifetime event logging rule" eventName="Application Lifetime Events" provider="EventLogProvider" /> </rules> </healthMonitoring> The sample code…