Showing posts with label Windows Azure. Show all posts
Showing posts with label Windows Azure. Show all posts

Thursday, May 22, 2014

Latest project: Yatmo, a new real estate search engine...

Recently, I put online my latest project: Yatmo!


It's a new real estate search engine that I have developped during my free time in London...

With this service, you can easily find a property which corresponds to your criteria and you can see the details in 7 languages (English, French, Dutch, German, Portuguese, Russian and Chinese!), the prices in 17 currencies and you can switch between m² and ft²!

We still need to increase the number of realtors, the website is ok for all the devices but not perfect so we will create a native mobile application... We only have Belgium in our countries list but we are ready to support more countries!

If you have any ideas/feedback/tips for me, do not hesitate to contact me!


Of course, Yatmo has been done in .NET!

The website has been realised with the following technologies:


For the moment, we have 4 small instances for the search engine, 2 medium instances for the administration area and one small instance for the background processes. And we are ready to scale out...

Update 2024: Yatmo is now a points of interest API used by different real estate portals in Europe.

We also created pages for all the countries in the World.

More information here:

Wednesday, May 1, 2013

New project for the belgian market

Edit: To comply with the laws of Belgium, the site has been put offline (some exchanges were not legal and I do not want to be responsible of that).

Last week, I launched a new site dedicated to the Belgian market (and maybe I will be targeting other countries after...): ChequeChange


The site is prety simple and is dedicated to the exchange of meal/eco vouchers in Belgium: this is not a business that fascinates me but making this project will be useful for some people and has help me to improve my skills! (the code and the databases of my next projects will be better!)

The website has been realised with the following technologies:

- ASP.NET MVC 4
- Entity Framework 5.x (but I still prefer using stored procedures that EF can map...)
- Windows Azure (2 small instances for the moment)
- MetricsHub (for monitoring and in case of automatic scale out needed... very good product!)
- SQL Azure
- Azure Storage
- Azure CDN
- Azure AppFabric Caching (thanks to MVC Donut Caching...)

The design is -almost- responsive and the site can be used on all the devices ;-)

This is my second experience with Windows Azure... I like this product! The SDK is excellent and up to date, the portal is well done and easy to use, the analytics are useful, performance are good, etc. A great product!

Tuesday, March 26, 2013

Entity Framework with SQL Azure Federation

If you want to use Entity Framework with SQL Azure Federation, you should know some details... According to this article, you have to ensure that the USE FEDERATION command has rerouted the connection to the appropriate federated member before an active transaction is established on the connection.

The way to do this:


   1:  using (var dc = new xxxxEntities())
   2:  {
   3:      ((IObjectContextAdapter)dc).ObjectContext.Connection.Open();
   4:      dc.Database.ExecuteSqlCommand(@"USE FEDERATION FederationName (FederationKeyName = FederationKey) WITH FILTERING = ON, RESET");
   5:      using (var scope = new TransactionScope (TransactionScopeOption.RequiresNew))
   6:      {
   7:          [...]
   8:      }
   9:  }

I have implemented it in a project and it works well with Entity Framewok 5.0.0 but an exception is thrown with Entity Framework 6.0.0-alpha3: "USE FEDERATION statement not allowed within multi-statement transaction."

I have created an issue on the Entity Framework Codeplex: "EF 6 and SQL Azure Federations".

Entity Framework 6 is very important for SQL Azure because it will contain a system of connection resiliency like the Transient Fault Handling Application Block can do. I hope that a solution will be found soon!

Moreover, like in my previous articleDon't Repeat Yourself!

If you want to use Entity Framework with SQL Azure Federation, take a look at this base repository class:


   1:  using System;
   2:  using System.Data.Entity;
   3:  using System.Data.Entity.Infrastructure;
   4:  using System.Transactions;
   5:   
   6:  namespace Admin.Persistence.Repositories.Impl
   7:  {
   8:      public class FederatedRepository
   9:      {
  10:          protected string FederationName { get; set; }
  11:          protected string FederationKeyName { get; set; }
  12:   
  13:          public FederatedRepository(string federationName, string federationKeyName)
  14:          {
  15:              FederationName = federationName;
  16:              FederationKeyName = federationKeyName;
  17:          }
  18:   
  19:          protected TK Execute<T, TK>(Func<T, TK> f, object federationKey) where T : DbContext, new()
  20:          {
  21:              TK result;
  22:   
  23:              using (var db = new T())
  24:              {
  25:                  SetFederationScope(db, federationKey);
  26:   
  27:                  using (var transactionScope = new TransactionScope(TransactionScopeOption.RequiresNew))
  28:                  {
  29:                      result = f(db);
  30:                      transactionScope.Complete();
  31:                  }
  32:              }
  33:   
  34:              return result;
  35:          }
  36:   
  37:          private void SetFederationScope(DbContext dbContext, object federationKey)
  38:          {
  39:              var federationCmdText = string.Format(@"USE FEDERATION {0} ({1}={2}) WITH FILTERING=ON, RESET", FederationName, FederationKeyName, federationKey);
  40:              ((IObjectContextAdapter)dbContext).ObjectContext.Connection.Open();
  41:              dbContext.Database.ExecuteSqlCommand(federationCmdText);
  42:          }
  43:      }
  44:  }

The utilisation is the same than in my previous article ;-)

Monday, March 5, 2012

Could not load file or assembly 'msshrtmi' or one of its dependencies

Today, for no reason, one of mine projects in ASP.NET MVC 3 crashed at launch... I had this error every time:


After some searches, I've found the solution:

  • unload your web project
  • edit the .csproj file
  • remove all "PlatformTarget" elements that you found
  • reload your web project

Normally, it should be enough but I have also changed my build configuration to x64 (inspite of Any CPU).

Hope that information can be useful for someone!

Tuesday, January 24, 2012

Windows Azure and Application Pool Timeouts

This article may help you if you use Windows Azure and you want your application to always responds as quickly even after a long period without use...

With default parameters, your app pool is shut down after 20 minutes of inactivity and your application will take a bit more time to respond.

You can simply change the settings if you want your application pool is never shut down:

- First step: create a new folder called "tasks" at the root of your Web Project and add a new file called "timeout.cmd" with this line of command:

   1:  %windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.processModel.idleTimeout:00:00:00

Once the file created, you need to put the "Copy to Output Directory" property to "Copy Always".


- Second step: add this into ServiceDefinition.csdef (at same level than "<Sites>", "<Endpoints>", ...):

   1:  <Startup>
   2:        <Task commandLine="tasks\timeout.cmd"
   3:              executionContext="elevated" />
   4:  </Startup>


You can find the code here: