title: How to connect to Azure Redis Cache
body: <p>I am trying to connect to an instance of the Azure Redis Cache (Preview) from a Visual Studio Web Project. </p>
  
  <p>I am getting the following error: "Could not load file or assembly 'Authorization token passed by user Invalid".</p>
  
  <p>I have done the following:
  1) Logged into Azure Portal and created a new <strong>Redis Cache PREVIEW</strong> 
  2) Opened Visual Studio and created New Project (Web MVC)
  3) Manage Nuget Packages - Update All
  4) Install Package - "Windows Azure Cache Version 2.2.0.0"
  5) Open Web.Config, in dataCacheClients section to the following:</p>
  
  <pre><code>&lt;dataCacheClients&gt;
  &lt;dataCacheClient name="default"&gt;
    &lt;autoDiscover isEnabled="true" identifier="mycache.redis.cache.windows.net"  /&gt;
      &lt;securityProperties mode="Message" sslEnabled="false"&gt;
      &lt;messageSecurity authorizationInfo="xxxxxxxmykeyxxxxxxxx"/&gt;
    &lt;/securityProperties&gt;
  &lt;/dataCacheClient&gt;
  &lt;/dataCacheClients&gt;
  </code></pre>
  
  <p>6) Changed HomeController.cs to the following:</p>
  
  <pre><code>using Microsoft.ApplicationServer.Caching;
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.Mvc;
  
  namespace CacheRedisTest.Controllers
  {
  public class HomeController : Controller
  {
      static DataCacheFactory myFactory;
      static DataCache myCache;
      public ActionResult Index()
      {
          if (myCache == null)
          {
              myFactory = new DataCacheFactory();
              myCache = myFactory.GetDefaultCache();
          }
  
          return View();
      }
  }
  }
  </code></pre>
  
  <p>Do I need some other nuget packages specific to Redis? Also where do I put the port number which is mentioned in the Azure console?</p>
  
  <p>Thanks for reading</p>