ASP.NET Control Lifecycle
Complete Lifecycle of an ASP.Net page and controls
http://blogs.thesitedoctor.co.uk/tim/2006/06/30/Complete+Lifecycle+Of+An+ASPNet+Page+And+Controls.aspx
Baretail – a great tool for montoring changing logs
Brian Canzanella blogged about Baretail in this article http://www.csharptocsharp.com/log4net-configuration-for-rockin-loggin
It doesn't look too special in the screenshot, but if you are looking for a tool which can monitor your logs live in Windows, this tool is fantastic.
Event validation error in ASP.NET
I ran into this .NET error yesterday:
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
This article may help if you have a page where the contents of drop down list boxes are being updated after the page has loaded - i.e. with JavaScript.
As K Scott Allen says, "Event validation checks the incoming values in a POST to ensure the values are known, good values. If the runtime sees a value it doesn’t know about, it throws an exception." http://odetocode.com/blogs/scott/archive/2006/03/20/asp-net-event-validation-and-invalid-callback-or-postback-argument.aspx
I had two Drop Down Lists which were being populated via AJAX after page load. The approaches to solving eventValidation errors I saw around on the .NET and StackOverflow:
- Disable event validation: bad unless you have a workaround for all elements on the page, and some users have said that this has stopped other events firing.
- Update the Render method: in some cases this will definitely work, in my case - it may be possible that I could have updated the validation with all possible values, something I haven't tried
- Replace DropDownList controls with select tags: probably not a good idea but could be used for a quick fix
- Some users have recommended adding an ASP.NET AJAX UpdatePanel around the affected control(s)
In my case I added all possible values of the drop down on page load and removed the AJAX functionality, as a quick fix, because the issue was occurring on a production site.
Sitecore CryptographicException: Padding is invalid and cannot be removed.
Something to try if you get the error below: Recycle the application pool for the given website. It worked for me.
Update: If that doesn’t fix your problem, try clearing your cookies.
Server Error in '/' Application.
Padding is invalid and cannot be removed.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[CryptographicException: Padding is invalid and cannot be removed.]
Sitecore issue – not all users being displayed in the User Manager
I know there more than 15 users should be returned by my providers, but only the first 15 are being displayed in the User Manager.
If I search using a search string such as "a" the results are correctly filtered to those including only "a". Some of the users returned in this result were not displayed in the previous listing. They are valid users and should have appeared when all users were being displayed.
Sometimes the users available shows "Page 1 of 2 (15 of 20 users)". Clicking on the right arrow to view the next page will display a different 15 users and in the bottom right hand corner users available is updated to "Page 2 of 1 (15 items)"
In the release notes for Sitecore,
October 21, 2009
Released Sitecore CMS 6.2.0 rev.091012 (Initial release). Change log. Important Changes:
User Manager
The performance of the User Manager has been improved again after 6.1 Update-1 had removed a previous optimization. This fix will, however, re-introduce the problem that the User Manager in certain situations, for example after creating a new user, will display an incorrect total number of users in the footer.
The Sitecore installation in question is using version 6.1.0 (rev. 090630)
Working theory: we need to update our Sitecore instance.
Smarty’s nl2br How to replace newlines with HTML breaks
Replacing newlines with breaks is as easy as
{$variable|nl2br}
http://www.smarty.net/manual/en/language.modifier.nl2br.php
OpenOffice Calc, numbers blue and formulae green!?
With so many shortcuts come many opportunities to execute a command unintentionally. At some stage in the last few days I hit Ctrl+F8 in OpenOffice's Calc application, and all the numbers on my spreadsheet turned blue, and all formulae turned green. I was wondering what had happened for a while, I hope this post saves someone time.
You can turn off the feature by pressing Ctrl+F8 or clicking on "Value Highlighting" in the View menu.
Wireframes considered harmful … under some circumstances
Web Standards Group Sydney presentation: On the 11th of March 2009 Tom Voirol spoke about an alternative development process for websites.
Tom said wireframes are harmful. But he didn't really mean it. What he was trying to say was that you shouldn't present the customer with wireframes and expect them to understand them in the same way we do as designers and developers. Customers don't speak the language of wireframes.
Tom suggested that we should create high fidelity prototypes to present to our customers.
Raphael Vector graphics in Javascript
Web Standards Group Sydney presentation: On the 11th of March 2009 Dmitry Baranovskiy presented Raphael, a vector graphics library for JavaScript.
Subversion bindings for Trac – Windows installer
It took me a while to find the Windows installer for the subversion bindings for Trac...
Apache 2.2 http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100
Apache 2.0 http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91