title: RedisServerException: ERR Error running script
body: <p>I'm connecting to the redis server. then saying redis-server. i'm getting the client up with redis-cli. I have my own MVC project. and the Products controller looks like this</p>
  <pre><code>public class ProductsController : Controller
      {
          private readonly IDistributedCache _distributedCache;
  
          public ProductsController(IDistributedCache distributedCache)
          {
              _distributedCache = distributedCache;
          }
  
          public IActionResult Index()
          {
              DistributedCacheEntryOptions cacheEntryOptions = new DistributedCacheEntryOptions();
  
              cacheEntryOptions.AbsoluteExpiration = DateTime.Now.AddMinutes(1);
  
              _distributedCache.SetString(&quot;name&quot;,&quot;Berkay&quot;,cacheEntryOptions);
  
  
              return View();
          }
      }
  </code></pre>
  <p>WRONGTYPE Operation against a key holding the wrong kind of value
  the error points here.</p>
  <p><strong><code>_distributedCache.SetString(&quot;name&quot;,&quot;Berkay&quot;,cacheEntryOptions);</code></strong></p>
  <p>also, my startup file looks like this. I have also made my definitions in ConfigureService</p>
  <pre><code> public void ConfigureServices(IServiceCollection services)
          {
              services.AddStackExchangeRedisCache(opt =&gt;
              {
                  opt.Configuration = &quot;localhost:6379&quot;;
              });
  
              services.AddControllersWithViews();
          }
  </code></pre>