Very handy tip for anyone doing ASP.NET MVC using AsyncController and experiencing timeouts

C# Disciples

Today I stumbled upon a timeout issue while building a web application and felt like I need to share this for those that like me wasted/are wasting hours trying to figure out why you are getting a timeout.

Here is a diagram that show the structure of the request response stack I have.

image

The reason why I went for an AsyncController is that the long running operation is not CPU-bound processing thus the thread that would be waiting for the response would be wasting its time waiting. More info on why and how to use Async Controllers in MVC3 can be found here.

All is fine and good until my I hit a request that took more than 1 minute, and then the nightmare of timeouts begun… So first thing I did is make sure I make the timeout for the WCF service longer. You can do this by…

View original post 150 more words

Advertisements

Handy Eclipse Shortcuts and Alternatives


So, I’ve recently found myself once more in the Java world, working using Eclipse. I am more of an IntelliJ IDEA guy, and when I work on a .NET project using Visual Studio, I always make sure that I install Jetbrain’s amazing ReSharper plugin… which pretty much bring a decent percentage of niceties to Visual Studio, over from the IntelliJ world.

If there is one thing that IntelliJ guys really got right, it is their shortcuts… and I truly miss them in Eclipse, even though Eclipse DOES actually cater for almost everything that IntelliJ does… but the shortcut scheme leaves much to be desired.

So I’m going to list here a few shortcut changes that will make my life (and maybe yours) better :) Some others are just good as they are (if not better than IntelliJ), but I’m listing them just to highlight their handiness :)

Just a quick tip/reminder on how to change shortcuts in Eclipse:

  1. Go to Window > Preferences…
  2. Navigate to General > Keys

..and there you are :)

Handy Shortcuts

Description Default Recommended
Switching to next tab/editor Ctrl+F6 Ctrl+Tab
Switching to previous tab/editor Ctrl+Shift+F6 Ctrl+Shift+Tab
*Quick Fix/Assist Ctrl+1 or F2 Alt+Enter
Select increasing/decreasing Word/Scope Alt+Shift+Up, Alt+Shift+Down, Alt+Shift+Left, Alt+Shift+Right
Delete Lines Ctrl+D
Copy/Duplicate lines Up/Down Ctrl+Alt+Up, Ctrl+Alt+Down
Move lines Up/Down Alt+Up, Alt+Down
Comment/Uncomment Line Ctrl+/
Comment/Uncomment Selected Block Ctrl+Shift+/, Ctrl+Shift+\
Rename Refactoring Alt+Shift+R
Activate Editor Window F12 Esc
Go To Declaration F3 F12
Quick Outline Ctrl+O
Quick Type Hierarchy Ctrl+T
Open Type Ctrl+Shift+T
Quick Go To Anything Ctrl+3
Call Hierarchy Ctrl+Alt+H
Find References Ctrl+Shift+G
Quick Refactor Menu Alt+Shift+T Ctrl+R,Ctrl+R

*This recommended shortcut is already registered to do something else in Eclipse. I suggest that you sort on Shortcut and remove any conflicts for this to work.