Posts

Showing posts from August, 2015

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;