• Uncategorized

    If Visual Studio takes ages to load…

    … it might be that you opened a project/solution from a network share which is no longer available, or that is slow to refresh etc… I had this problem myself with Visual Studio .NET 2003 (not Visual Studio 2005 so far, so I’m not sure if this is also affected or not), and took a while to figure out what the problem was. Procmon and some patience to go through the log pointed me to an interesting registry key: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1\ProjectMRUList (the same key exists for VS 2005, but it’s under *VisualStudio\8.0\ProjectMRUList). This key contains the path of the last 20 solutions I opened/created; what’s interesting is that by default Visual Studio does not show all the recent solutions opened (in File menu or in the Start Page) but just the last 6 (I usually change this value to 10), but despite that it reads all the values and (I guess) verify if the solution is still available, thus the delay… To solve my problem I simply deleted the values pointing to a solution from a network share et voilà, Visual Studio was loading at the usual (reasonable) speed.   Cheers

  • Uncategorized

    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…

  • Uncategorized

    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…

  • Uncategorized

    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"…

  • Uncategorized

    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

  • Uncategorized

    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…

  • Uncategorized

    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  …

  • Uncategorized

    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…

  • Uncategorized

    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!…