Sunday, September 25, 2016

Net702 - Lab 3: Using DynamoDB as a Session State Provider

Using DynamoDB as a Session State Provider 

Amazon DynamoDB is a fully managed non-relational database service, here we are using it to pre-create a session table for DinoStore. Here we will be storing all the session data of the web activities (Big Data) which we can use later on. 

I have created a DinamoDB table (ASP.NET_SessionState) with the hash key named SessionId.




After creating the table we need access key and private key from AWS. It is in the AWScaccount tab security creational option. I have downloaded it and saved it on my local computer, these keys are necessary to access the AWS while connecting through some programs.



 Now we have to prepare Visual Studio application by installing some NuGets. I have installed AWSSDK NuGet.


Then I have edited web config for the sessionstate.


I have given the details of the DynamoDB table with the Access key and Secret Key. I have made necessary changes in Shopingcart.cs also.


 Then I was getting an error when I tried to build the project, then I have installed the AWS sessonprovider and Extensions NuGets. Then I have found out that I was using a different region in the coding, I have changed it also.



I was successfully built the project then login to the website and made an item into the shopping cart.


Then went back to the DynamoDB and found that the item has came to the table.


No comments: