In the demo you will use session connector to the save users' values in Redis cache.
- Create Redis instance in Azure
- Update
Web.Config
with your Redis instance parameters:
-
For successful run demo customer networks should allowed communication to Redis.
-
Non-SSL port (6379) enabled
You will demonstrate who session values can be hosted in Redis (for scalability your application).
- Run the web project.
- Web site should be open automatically with start page.
- Copy the URL – it contains your session identifier. Next time you can return to your session by this identifier.
- Enter the test value and set the value in session. Click "Add to Session" to save the value.
- Click "Retrieve from…" to read the value from session.
- Stop debugger and close the Web browser.
- You can demonstrate the code of the page. It has simple call to Session["ModuleName"]
-
You can restart VS, IIS or whole computer.
-
Run the project again and paste the URL you copy before. You will be able to return to your old session. (it use cookless session)
-
Click on the button
Retrieve from…
to read the value from session (Redis).