Showing posts with label Asp.Net MVC. Show all posts
Showing posts with label Asp.Net MVC. Show all posts

Apr 18, 2016

Good Technical Study Links:


MVC Fluent API EF









-------------------------------------------------

Simple Web Token



---------------------------------------------------------
Instrumentation and Performance Metrics


----------------------------------------------------------------------------

SOA Patterns and standards:








-----------------------------------------------------------------------------------------------------------------------

WebAPI / REST related:



-----------------------------------------------------------------------------------------------------------------------

Precompile controllers and views






Lazy(T) Class





-----------------------------------------------------------------------------------------------------------------------

Weak Reference Class








-----------------------------------------------------------------------------------------------------------------------

SOA Entity Composition:














Feb 1, 2016

Configure ASP.NET SignalR in a web farm


I had a problem after I put into production a Visual Studio project with SignalR library.

In localhost every call seemed to be right but after the publishing step, some random request returned me an http error. After some google search I found that the problem was that the site is published in a web farm with 7 differents servers. In this case could happen that the first call is send from one server and managed from another server in the farm.

Every server has its encryption and decryption own code and if you want SignalR calls return a valid http status you should share these keys from the servers in the farm. So for each server in the farm open IIS and go to Sites and single click in the site where SignalR is used. In the central panel now go to Machine Key and double click.

Uncheck “Automatically generate at runtime” and “Generate a unique key for each application” and put a valid unique validation Key and a valid unique decryption key in the text boxes.

Look at the picture below, you should have something similar to this.

[Excerpted from: http://nextstepblog.altervista.org/configure-asp-net-signalr-in-web-farm/?doing_wp_cron=1454300698.7938909530639648437500]



Other Important Links:

http://www.asp.net/signalr/overview/performance/scaleout-with-sql-server

http://www.tugberkugurlu.com/archive/scaling-out-signalr-with-a-redis-backplane-and-testing-it-with-iis-express

http://www.hanselman.com/blog/AsynchronousScalableWebApplicationsWithRealtimePersistentLongrunningConnectionsWithSignalR.aspx

Dec 10, 2015

Compile your asp.net mvc Razor views into a separate dll

A "step-by-step" guide on how to compile your razor views into a separate dll. Good post about how to package your MVC razor views into a shared .NET assembly that you can use in multiple projects. In the past, I often had duplicated views / helpers in each project that was using ASP.NET MVC 3 w/Razor. This was getting to be a maintenance headache, so I looked around and saw Chris Van De Steeg’s post about how to actually accomplish this.
Pre-compiling-razor-views

Precompile-mvc-views

Detect-errors-of-asp-net-mvc-views