Skip to main content

DOTNET - Tips and Tricks

Been a while since I blogged on dot net and cant wait any more-

I would like to highlight a couple of things that can be very handy and you should be aware of if you are not-

1. Taking a site offline- When you make an ASP.NET website offline, many developers simply stop the website using IIS after informing the stake holders.

A neater way of doing this is to place a file named "app_offline.htm" in the root directory of the website. This will force IIS to display contents of this page instead of any other page requested from your website.

Note: The size of the file should exceed 532 KB. This is a know limitation

2. In Visual Studio while working on any file, if you need to indent the code, you can let Visual Studio do the job by using the shortcut Ctrl+K+D. Visual Studio automatically indents the code for you (assuming you have no syntax errors in your code) and it does a neat job.
This tip can be very handy and save you lot of time.

3. Some important keyboard shortcuts especially imp while debugging
    Ctrl + '-' (minus): This keyboard shortcut moves you to the last location you were on in Visual Studio
   Ctrl + Shift + 'F': Find all
    Ctrl + Shift + '-' : Moves to next position from which you have backtracked
    Ctrl + Alt + 'P' : Shortcut for Attach to process
    Ctrl + Shift + F10 : Set Next Statement useful while Debugging
    Ctrl + Alt + 'I' : Show Immediate Window
    Ctrl + D, W:  Show Watch window

Will update some more stuff but at the moment three tips are on top of the mind.
Until then signing off

Hitesh

Comments

Popular posts from this blog

A simple customization in MPOS (Blank Operation) with AX7

Hi All, I recently had to add a Blank Operation to Modern POS (MPOS) to open a url from MPOS. Blank Operation as you may already be aware enable you to extend Microsoft Dynamics Retail for POS by adding custom logic that can be triggered from the Retail POS Register buttons. The way to implement Blank Operations in MPOS  is different from Enterprise POS as MPOS is a modern app as compared to EPOS which is a windows forms based app. So lets explore a very simple customization i.e. we want to open a URL on triggering a button from MPOS. 1. We would need to start with AX to add a button to the layout of MPOS. If you do not want to disturb the standard layouts its better to copy one of the existing layouts and then modify it using the designer. Please note the designer only opens in Internet Explorer so it will save you time by not trying to open it in other browsers e.g Chrome 2. Next we need to add this layout to the Store where we intend to use it, in

Hyper-V VM 100% disk utilization

I was facing a persistent issue of 100% disk utilization on starting any VM in my Hyper-V. The below link helped me to resolve it https://social.technet.microsoft.com/Forums/office/en-US/2b184f22-ea8c-4bc3-9f64-8b46eeaeef61/hyperv-host-disk-usage-at-100?forum=w8itprovirt