Dear Reader,
On the right hand side menu, please choose technology category if you are interested in technology posts OR find the tag cloud and click on the keyword of your liking and keep reading. In the posts, if you are unable to clearly view any image, click on it to view the image zoomed in.
Thank you for visiting.
-Ketan Thakkar

Chrome bug — Error in event handler for undefined IndexSizeError: DOM Exception 1 Error: Index or size was negative, or greater than the allowed value.

  Inter­est­ingly this error was not caught even by my window.onerror — the rea­son why I couldn’t see it in the trace when peo­ple started com­plain­ing about weird click events with chrome. https://code.google.com/p/chromium/issues/detail?id=158989   Workaround: http://stackoverflow.com/questions/13104177/getting-an-error-when-using-jquerys-click-event This will not work if the error is inside a library. Well unless you prototype/inherit the method (if its …

Microsoft JScript runtime error: Object doesn’t support property or method ‘live’

Have you ever received this error in the con­sole. The client side MVC val­i­da­tion runs into this error quite often. Par­tic­u­larly if you start a new MVC 4 project with lat­est jQuery. Well lat­est and great­est is good, but this error is par­tic­u­larly annony­ing. jQuery migrate is a library that was cre­ated to resolve the …

WebAPI JSON serializer and .NET 4.0 Tuple

So, you thought that you would cre­ate any type in C# and the default WebAPI seri­al­izer will auto-magically dese­ri­al­ize every thing for you? Tuple<int, int, string, string.….…… and you’d go on for­ever and still the seri­al­izer fig­ures out what you meant. Doesn’t hap­pen. Of course an alter­na­tive is to use a spe­cial type — I’d recommend …

Windows Azure Caching simplified

A lot of mate­r­ial is avail­able on the Win­dows Azure por­tal and it is over­whelm­ing at start. I’ve tried to show the infor­ma­tion pic­to­r­ial for a big­ger pic­ture. The code sam­ples are avail­able for how to use or con­sume the cache — I wouldn’t be pro­vid­ing that. For now just under­stand that pro­vi­sion­ing the cache …

WebClient versus HttpClient to consume HTTP requests

I hope to add more from my expe­ri­ence, but here’s a good start on the topic. While in past devel­op­ers chose to go bare bones with WebRe­quest and WebRe­sponse class, it is no longer nec­es­sary. While you may abstract out the ways to make HTTP calls in your appli­ca­tion for loose cou­pling, fol­low­ing are the options …

Making HTTP Get Request Programmatically downloading multiple files and extracting into Stream and save to Windows Azure Blob Storage

I did this using .NET ver­sion 4.5. Please make the REST call more elab­o­rate and mem­ory usage tighter. Use async key­word as the call is an IO. Set up Local­Re­source stor­age on Win­dows Azure (http://msdn.microsoft.com/en-us/library/windowsazure/ee758708.aspx) Make a REST­ful GET call to down­load a bunch of CSV packed into zip (archive as .NET C# libraries call it). …

HTML5 performance tricks — blazing fast applications

 Web per­for­mance (Desk­top, Mobile or Tablet) Net­work (con­nec­tiv­ity and band­width) CPU (Hz) — Met­ric Time to Glass (Amount of time a user takes the action and site is loaded on the glass) Elapsed Page load (When user clicks on link and page loads and CPU is calm/acquiesces) CPU time (How much time used) Idle CPU time (CPU

Delete all .NET cache for all versions from the server

I always use the batch file (.bat) to per­form this oper­a­tion. 1. Open notepad and paste the fol­low­ing. @ECHO OFF ECHO Per­form­ing IIS Reset IISRESET ECHO Delet­ing Cache Del /F /Q /S %LOCALAPPDATA%\Microsoft\WebsiteCache\*.* Del /F /Q /S %LOCALAPPDATA%\Temp\VWDWebCache\*.* Del /F /Q /S “%LOCALAPPDATA%\Microsoft\Team Foundation\3.0\Cache\*.*“ Del /F /Q /S “C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\*.*“ Del /F /Q /S …

Visual Studio stop build while in process

Have you ever had a no shit moment — while build­ing in Visual Stu­dio? Did you have a large solu­tion with tons of projects and you either hit F5 or debug but didn’t intent to? I haven’t found a bet­ter way to stop the build, so I do the fol­low­ing — Switch the “Solu­tion Configuration” …

Failed to create an instance of ‘Microsoft.SharePoint.IdentityModel.SPTokenCache, Microsoft.SharePoint.IdentityModel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ from configuration.

You get the fol­low­ing error: Failed to cre­ate an instance of ‘Microsoft.SharePoint.IdentityModel.SPTokenCache, Microsoft.SharePoint.IdentityModel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ from con­fig­u­ra­tion. Stack trace: at Microsoft.IdentityModel.Configuration.CustomTypeElement.Resolve[T](CustomTypeElement cus­tom­Type­Ele­ment, Object[] argu­ments) at Microsoft.IdentityModel.Configuration.ServiceConfiguration.LoadHandlers(ServiceElement ser­viceEle­ment) at Microsoft.IdentityModel.Configuration.ServiceConfiguration.LoadConfiguration(ServiceElement ele­ment) at Microsoft.IdentityModel.Configuration.ServiceConfiguration..ctor() at Microsoft.IdentityModel.Web.FederatedAuthentication.get_ServiceConfiguration() at Microsoft.IdentityModel.Web.HttpModuleBase.Init(HttpApplication con­text) at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr app­Con­text, Http­Con­text con­text, Method­Info[] han­dlers) at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, Method­Info[] han­dlers, IntPtr app­Con­text, Http­Con­text con­text) at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr …

  • Tag Cloud

  • Recent Tweets

    Follow Me on Twitter

    Powered by Twitter Tools

  • Categories