Posts

Using SQL Server for the Storage Emulator database

Without doing this, you may corrupt the storage database causing untold grief and pain. Open the Microsoft Azure Storage tools console and do the following: Microsoft Azure Storage tools Type azcopy /? for help on AzCopy. C:\Program Files (x86)\Microsoft SDKs\Azure>azurestorageemulator init /server .\ \ 'azurestorageemulator' is not recognized as an internal or external command, operable program or batch file. C:\Program Files (x86)\Microsoft SDKs\Azure>cd storageemulator The system cannot find the path specified. C:\Program Files (x86)\Microsoft SDKs\Azure>cd storage The system cannot find the path specified. C:\Program Files (x86)\Microsoft SDKs\Azure>cd storage emulator C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>azurestorageemulator init /server .\\ Windows Azure Storage Emulator 4.1.0.0 command line tool The storage emulator was successfully initialized and is ready to use. C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>

Getting the difficult stuff done using Typemock and xunit 2.0

I like Typemock - we should never have to change code to make it testable. Mocking To mock all static methods of a type Isolate.Fake.StaticMethods(typeof(ClassName)); You will have problems sometimes especially if any class has a static constructor. Took me hours to figure out this below is a good idea before making the above call: Isolate.Fake.StaticConstructor(typeof( ClassName )); Isolate.Invoke.StaticConstructor(typeof( ClassName )); >> Do not invoke this if you are going to swap instances which will internally attempt to call this. Isolate.Fake.StaticMethods(typeof(ClassName)); Calling original static method if above is done Isolate.WhenCalled(() =>  ClassName .MethodName()).CallOriginal(); Mock the next instance of a certain type used within a method var mockInstance = Isolate.Swap.NextInstance<ClassName>().WithRecursiveFake(); Isolate.WhenCalled(() =>  mockInstance .MethodName(null)).IgnoreCall(); Changing Behavior Mock public static ...

Sharepoint not working after OS upgrade to Win 2012 R2?

I used the below article: http://blogs.msdn.com/b/sambetts/archive/2014/03/17/upgrading-an-existing-sharepoint-2013-farm-to-windows-server-2012-r2.aspx That pointed to this one, which fixed the issue: http://blogs.msdn.com/b/sambetts/archive/2014/03/17/sharepoint-health-report-error-the-security-token-service-is-not-available.aspx Just open a regular command prompt, go to the folder and then run the command. Reboot server - all set!

When two namespaces are the same in different dlls

Where you reference the dll, in the Aliases property give an alias using the syntax: global, myalias. Here "myalias" is your alias. In the first line of your C# file, specify: extern alias myalias; Then reference the namespace as: using myalias.yournamespace;

VS 2015 Profiler may show different results with report generated from VS 2013

I just noticed that if I generate a profiler report using VS 2013, but open it in VS 2015, the report shows different results. Do not open the report in a different version of visual studio!

Unable to open huge profiler files in Visual Studio? (10GB 20GB)

Visual Studio would crash and burn on every system I tried. Finally got it working on a Windows 2012 R2 server with 98GB RAM. Still hangs, but can go through the different views. Found out the real reason - when it is opening the file, it is taking up disk space in the temp folder. If you do not have huge disk space then it runs out of space and dies. Observe the drive with temp folder having less and less space when the file is being opened. Also, you cannot predict how much it will consume. For a 10GB memory profile 50-60GB space was enough. For a 5GB sampling report, it is consuming more than 100GB.

Optimizing Windows Applications for Networking

This excel sheet is invaluable and shows all the settings I know of at every level (including the OS) to maximize the performance and scalability of network communications for any application running on windows. You will not be able to find all these settings in one place anywhere else. https://app.box.com/s/2rmmt0y09ybuu4747cpcae0adf7zfwkd