Skip to main content

Posts

Debugging code running on Remote machine

Before performing below steps, you need to make sure you have pdb files matching dll version on the remote machine.  Open below folder in your remote machine C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Remote Debugger\x64  Open that folder and launch as admin  msvsmon.exe  Select all options to allow firewall From Tools > Options  - Keep the settings to default (as shown below) and click ok.  At this point your remote debugger is all set. You need to connect from Visual Studio by entering Machine IP: Port (4022) 
Recent posts

Dynamics365 PluginRegistration tool throws Error - Assembly must be fully signed (not delay signed) though you are uploading signed dll.

You might be here because you are getting this misleading error "Assembly must be fully signed (not delay signed)" although you have successfully generated signed dll either locally or from VSO server. I am documenting this specific error scenario here as I couldn't find anything available over the internet.     I had generated fully signed dll using our VSO build definition. When I am uploading this dll to PluginRegistration tool using the assembly “Update” option, it kept throwing the below exception: Unhandled Exception: System.ServiceModel.FaultException`1[[< >]]: Action failed for assembly << TRIMMED >>: Assembly must be fully signed (not delay signed). Detail: … Earlier we were able to update the build generated assembly right from this tool. We are using the task "ESRP CodeSigning" for code signing process. When I checked the history of this definition someone had modified it’s configuration.  So during update

Dynamics365 PluginRegistration tool throws exception "System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\...\xyz.dll' or one of its dependencies."

If you are facing below highlighted error detail with PluginRegistration meaning you are trying to register signed/unsigned dll download over the network.  Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\\...\xyz.dll' or one of its dependencies. Operation is not supported. ( Exception from HRESULT: 0x80131515)    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)    at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)    at System.Reflection.RuntimeAssembly.InternalL

Date period overlapping scenarios

Here is the code that does the magic: var isOverlapping = ((A == null || D == null || A <= D) && (C == null || B == null || C <= B) && (A == null || B == null || A <= B) && (C == null || D == null || C <= D)); Where.. A -> 1Start B -> 1End C -> 2Start D -> 2End Proof? Check out this test  console code gist .

Web Functional Testing Automation using CasperJS and Nodejs

Background We are in era the of Web, Mobility and AI. Days are gone where we used to think Javascript is just for client side validation check before submitting web forms. Thanks to ECMAScript5 and above which advanced javascript language way forward. Many Enterprises across the world already building applications using lot of opensource Javascript technologies.  Automating the Testing of any web application is becoming challenging and critical for the business. Challenge is in terms of manage and maintain test hygiene throughout the application life cycle and overall product quality. The ideal behavior of any test automation is to be able to integrate as part of CI and CD  (Continuous Deployment)  build and be able to run without manual test run effort and publish test results with code coverage metrics. There are many different frameworks available in the market to solve automation problem. To name few:  CodedUI -  Browser based test automation suite on .net Selenium

Upgrading from ASP.NET.Identity 1.0 to 2.0

ASP.NET.Identity 2.0 is out, and it adds a bunch of great features. – Two-Factor Authentication (SMS, Email or custom) – Account Lockout – Account Confirmation via Email – Password Reset – Sign out everywhere – Choose your Primary Key type (string, int, Guid) – IQuerable Users and Roles – Delete User – Enforcing Unique User Names The upgrade was more fiddly than I thought it would be. Here is what I had to do. I hope it helps. 1. Update Entity Framework to 6.1 2: Update all your OWIN components if they already exist in your project. (Yes. NuGet should handle this for me. It didn’t. Upgrading the Owin components before the Identity packages resolved some issues for me) 3: Update Microsoft ASP.Net Identity Core and then ASP.Net Identity EntityFramework

Reboot WorkerRole using Azure Automation RUNBOOK

Problem:  Scheduling worker role can become a big pain when it comes to long running background tasks. This is because there are no scheduling options available for worker role (as on date of publishing this article) although there are some alternatives to sleep worker role for a while. We needed to automate the process re-executing worker role based on schedule typically every day interval.  We choose Webjobs as it has best scheduling options to execute back ground jobs. Although, we can interact with azure cloud management using azure management libraries and management certificate, it became hard to encrypt the sensitive information such as certificate string, subscription id etc,. Solution: We found Automation RunBooks are the way to go to solve this problem. As it has out-of the-box support to write powershell workflows to manage azure. Nice thing about Runbooks is that it has good scheduling options so that we can schedule workflow as a recurring event.  Also, all thi