Page 1 of 1

Jiwa Web API and Redis

PostPosted: Tue Jul 10, 2018 10:08 am
by SBarnes
Hi Mike,

In doing some experimentation with the use of Redis as a possible choice for Session Management locally and with Azure it will complain about trying to serialise any object that is not annotated as [Serializable], which of course none of the API DTO objects are marked as, would there be any way of having this done as part of the build process?

Re: Jiwa Web API and Redis  Topic is solved

PostPosted: Tue Jul 10, 2018 7:48 pm
by Mike.Sheen
Hi Stuart,

This should be trivial for us to do - logged as improvment DEV-6746 and should be in the next build.

Mike

Re: Jiwa Web API and Redis

PostPosted: Wed Jul 11, 2018 10:05 am
by SBarnes
Hi Mike,

Thanks, I thought it would be fairly easy to do.

Having read your development note, whilst I'd have to double check if it happens on Azure Redis, I can say with absolute certainty that it happens on Redis locally under windows, which means it will be a development issue if local Redis is used for development purposes with the intention of moving to azure eventually and avoiding the need for the Azure service during development i.e. cost.

By the way if anyone is looking to make configuring Redis easy you can set up app settings such as

Code: Select all
    <add key="REDIS_HOST" value="127.0.0.1" />
    <add key="REDIS_PORT" value="6379" />
    <add key="REDIS_KEY" value="" />
    <add key="REDIS_SSL" value="false" />


and then set the provider connection details like this

Code: Select all
 <sessionState mode="Custom" customProvider="RedisSessionStateStore">
      <providers>

        <add name="RedisSessionStateStore" type="Microsoft.Web.Redis.RedisSessionStateProvider" host="REDIS_HOST" port="REDIS_PORT" accessKey="REDIS_KEY" ssl="REDIS_SSL" />   
 
      </providers>
    </sessionState>