…and still I am! I moved to a new house, in a new town closer to the office (well… let’s say that now I have to drive in the traffic for just a little bit more that one hour instead of more that two hours I had before…), and as you can imagine I’ve been quite busy with the pack/move/unpack side of this thing (and still when I’m looking for something I have to guess in which cardboard box it could be), and I’m also fighting with our Telecom company to have my new phone line and Internet connection… I guess this situation will go on for a while, and since Christmas is coming and every activity will stop I hope to be back online in full forces at the beginning of the new year š UPDATE (2 January 2007) Well… thanks to our Telecom Company (which we can’t leave, by the way, since it’s the only one supposed to work for us… ) I’m still without the phone connection at home, so no Internet connection either… too long (and probably not interesting for others) summarize the ups and downs of this story, but I feel like I’m lost in…
-
-
Help, my application crashes! No, it hangs… Uhm… we get a strange error… What…?!? (the importance of a proper problem description)
Dealing on a daily basis with customers and the problems they encounter using Microsoft technologies and products, and having to help them troubleshoot and resolve those problems, specially at the beginning of a new support call (after I pick the case up from the incoming queue and put it in my wipbin, as it’s called my personal queue in our CRM software) I call the customer to discuss about the problem and to get a detailed overview of the faulting application, the environment where it’s running (or it is supposed to run), the error they get, under which circumstances they get it (under load picks, any specific operations going on at that time on the server, any reproducible behavior by one of the clients…), side effects (high memory, high CPU, performance slowness…), how they (at least temporarily) get rid of it (recycle the application pool, iisreset, recompile…). in those situations, quite often I end up asking almost the same questions to every customer to start building a picture of the situation, and when I think I have this quite clear in my mind I can elaborate an action plan to start digging into the situation questing for the bad guy.No need to say…
-
Don’t slide your expiration without cookies!
This week I’ve been working on a problem which at the beginning seemed to be just a matter of configuration but that then took some more time that I expected to resolve… so, here it is. In my ASP.NET 2.0 application I edit my web.config to set slidingExpiration=ātrueā and cookieless=ātrueā in Forms authentication. Basically what happens is that after half of the timeout set in <forms> element is elapsed, the user is redirected to the login page; e.g. I set <forms timeout=”3″ cookieless=”UseUri” enableCrossAppRedirects=”true” /> (timeout 3 minutes), if I postback the page after 1 minute and 35 seconds, Iām redirected to the login page (but the Forms authentication ticked should still be validā¦). This canāt be a cookie problem because we are not using cookiesā¦ First, a quick review of sliding expiration: “When the SlidingExpiration is set to true, the time interval during which the authentication cookie is valid is reset to the expiration Timeout property value. This happens if the user browses after half of the timeout has expired. For example, if you set an expiration of 20 minutes by using sliding expiration, a user can visit the site at 2:00 PM and receive a cookie that is set to expire…
-
Find which application pool is hosting your application
If you have an IIS 6 with multiple application pools running, and you need to know which w3wp.exe process is actually hosting your application (suppose you have to capture a dump and don’t want to use the “-iis” switch with adplus,Ā which will produce one dump file for every w3wp.exe, dllhost.exe and for inetinfo.exe), then follow these steps to find out: Using the IIS Manager, note down the Name of the App pool for your application In the command prompt, go to <WindowsFolder>System32 Type the following command: iisapp.vbs /a <AppPoolName> (Use double quotes around the name if it has a space) The result will contain the Process ID for your application pool TheĀ greatestĀ mistake you can make is to be continually fearing you will make one. – Elbert HubbardĀ
-
Visual Studio 2005 hotfixes made public for download
After readingĀ this post a while ago regarding the availability Policy for some hotfixes (e.g., not all hotfixes are public for download, and you have to call Microsoft Support to obtain the one you need), I had an internal discussion with my team on this topic. Basically those are some of the reasons (at least the one I know about) for this controversial choice: As stated in every KB article, those fixes have not gone through the same accurate testing as public fixes or Service Packs, so it’s possible that with a particular configuration the fix a customer request is not the right approach for him We keep track of the hotfixes we send to customers, and if a bug orĀ problem is later discovered in that particular fix, thanks for those records we know who has installed it and we are able to contact those customers to send them an updated version of the patch, or in any case inform them of the newly discovered problem and help them to avoid it More often than you can imagine, we receive clearly wrong hotfix requests: for instance, a particular exception in Framework 1.0 has been fixed and the KB article is still…
-
Code Access Security hosting control in IE
PROBLEM You have a Windows Forms component hosted in Internet Explorer, and you want to catch events raised by this control from client side scripting; to avoid security errors at runtime, the control must have “Allow calls to unmanaged assemblies” permission. if you do this, you’ll notice that this works only if you give this permission to the whole Zone or Site, but does not work if you give it just to the Assembly or the URL. REASON The reasoning behind the security exception is AppDomains. Before IE can load your assembly, it must create an AppDomain to load the assembly into. When it creates this AppDomain, it assigns all the evidence it knows without loading your assembly, the Site and Zone that it is loading from. Since the AppDomain itself does not get any evidence about the signature that your assembly has (it can’t since the assembly is not loaded yet), it will not match the code group that you created giving extra trust. Now when a security demand occurs, a stack walk begins. When your assembly is checked for correct permissions, it passes, and the stack walk continues until it gets to the AppDomain. Since the AppDomain doesn’t…
-
ASP.NET 2.0 compiler slowness
Here is an interesting problem I worked on a couple of weeks ago for a customer who raised a call with Technical Support: they had an ASP.NET 2.0 application written with Visual Studio 2005, and while working on it they found that when changing a code file contained in App_Code folder and then building the site from the Visual Studio menu command, this took up to 7 minutes to complete… and if they then run a page pressing SHIFT+F5 it took about 25 seconds to compile and display the page. If they just modified the HTML layout of the pages everything worked fine; moreover, it’s interesting to note that if they simply modified and saves their files without building the solution in Visual Studio, but just browsed the page (thus relying on ASP.NET to compile on the fly their code) again everything worked as expected. This seems quite clearly a problem with Visual Studio. It turned out that this project was originally build with Visual Studio 2003 and ASP.NET 1.1, and they decided to upgrade it to ASP.NET 2.0; they used the upgrade wizard provided by Visual Studio 2005, which will turn on batch compilation (<compilation batch=”true” /> in web.config) when it…
-
Sometime is obvious, but not for everyone
I just realized that my last post is 20 days old… I spent this time working on support calls I own (or course, that’s my job!), reading documentation and playing to get ready for the upcoming releases I’m quite sure you already heard about (Vista, Ajax, IIS 7, Internet Explorer 7…), reading some good books in my spare time (currently I’m almost done with The Twelfth Card by Jeffery Deaver) and among other things I’ve been searching (and found) a new home. (well, actually my girlfriend decided where we’ll go to live for the next years, I guess you know how this king of things works…). While I had to deal with the contracts and terminology I’m not familiar with, I realized that sometimes people tend to give some things and facts for granted, while other people may not know what we are talking about… This also apply to our business: I had some conversations with our customer getting “Application Server Unavailable” errors in their ASP.NET sites, and then we discovered that they tried to execute two different CLR versions (usually ASP.NET 1.1 and 2.0) in the same worker process… This is not allowed, and I always thought this was clear, but a couple of customers…
-
Sweet sorrow… remote debugging (and more)
Continuing from my previous post on common causes for memory leaks, remote debugging is another ASP.NET feature that has the potentiality to either delight (uhm… am I exaggerating here…? š) a web developer or drive him completely crazy š I remember 8-9 years ago, when I was a young technology passionate learning the basics of web development (HTML, CSS, ASP etc…), on my desk I just had a couple of programming books for beginners, my dial-up modem to download some online manuals and my copy of Office 97 for students. My editors at that time were FrontPage 97 and Notepad… so all I could do to debug my web pages were to use lots of Response.Write() to inspect variable values, and lot of brain work to try to understand where things were going wrong… With ASP.NET and Visual Studio .NET in these days developers still have to do lot of brain work, but for sure the tools now help a lot with debugging web applications… but what happens if the debugger has tantrums? š² Here is a list of the common debugger problems I saw so far in my experience with Microsoft Support; this is not at all a comprehensive…
-
Quick things to check if you are leaking your memory
After a couple of years working in InternetDev support I’ve seen many different kind of problems reported by customers (different environments, different use of Microsoft technologies and products combined together, different application needs, different customer’s background and technical knowledge etc…), but as one of my favorite authors said, Sometimes they come back, so it happens that sometimes we also get incoming calls for well known problems like memory leaks, high CPU and worker process crashes. Of course there could be many different causes for those problems, but some of them are more likely to affect your application; here is a list of the first things I check when I’m working on a memory leak problem (usually analyzing a memory dump of the faulting application). This is not a complete list (but I promise to update the post if I’ll find something new and interesting) and if you talk to other Support Engineers they might give you a slightly different view on the subject, this is what I found and learnt in my day to day support experience. Application deployed in debug mode This is something we must avoid in a production environment; debug mode is useful during development, but in…