Wednesday, April 10, 2013

State Management : What, Why and How


In this article focus on state management in ASP.NET MVC.

What is state management ? 


State Management is the process followed by developers in web application development to maintain state and page information over multiple request for the same or different pages.


Why do we need to manage state ?

The main way of communicating with internet  HTTP. This HTTP protocol is stateless. It doesn't know anything about last request. Not having to remember user's last request web server can handle many concurrent users. ASP.NET MVC is designed with this stateless nature of HTTP. Because of this reason when we needs to remember user last request or user information we have to take the approach of state management.

 How do we manage state in ASP.NET MVC ?

Client - Side 

Cookies  - small set of information passed to there server in every HTTP request. According to the requirement can set the expiration time for the cookies.

Query String - information appended to the URL. For secure the information can use HTTPS.

Hidden fields - Store value in the form hidden field. this value can use to send sever and operation of the client side.

Server - Side

Cache - cache object available for the all class within the application. This cache object can access through any user or page in the application domain.


Session - Information stored in the server and unique for the each user. There are mainly two method of session management which are InProc and OutProc. InProc use the web server memory and it comes with by default in IIS. In distributed application needs to use OutProc method. There are two method in OutProc way which are State server and SQL server. To use these methods in distribute application have to made changes to web config.

Profile - Information stored based on user name in a database. The profile is part of Membership and Roles provider.

Monday, February 4, 2013

SEO tool kit

Recently in a project client asked to enhanced the web site search engines. To fulfil that requirement selected tool call SEO tool kit given by Microsoft. This tool give you capability to increase rank in search result and optimize the content for it. This is run under internet information service (IIS). You have to install it to the IIS.


Using this tool you can analyse a website or a web application, create sitemaps, and
create robot exclusion rules and a robots.txt file for a site, which tell search engines not to
index a certain page. Site analysis give you violations of your web content as shown in below.

Using this tool you can check more information about violations in page level as well.

Download from here

Friday, July 8, 2011

උගෙනිමු C

අද අපි පරිගණක තාක්ෂණයට සම්බන්ද බොහො දෙනෙක් අසා තිබෙන පරිගණක මෘදුකාOග භාෂාවක් වන C ගෑන අද ඉදලා ඉගෙන ගනිමු.ගොඩක් පරිගණක තාක්ෂණයට සම්බන්ද  දෙවල් වල මුලික භාෂාව වන්නේ මේ C. වින්ඩොවස් මෙහෙයුම් පද්ධති, ජාවා වෑනි බොහෝ නිපෑයුම් වල මුලික හරය වන්නේ මේ C තමා. මේ භාෂාව හදුන්වන්නේ structural  programming  language එකක් ලෙසට. ඒ ගෑන මම වෙන්ම ලිපියකින්  ඔබ වෙත එනම් මොනවද එ කියලා. හොදයි අද අපෙ පළමු පාඩමට යමු.
මේ සදහා මම භාවිතා කරන editor එක තමා notepad++ .
හොදයි එහෙනම් අපි පළමු වෑඩසටහන බලමු.
image
මෙසේ ලියු පරිගණක වෑඩසටහන මේ ව්දියට  hello.c ලෙස save කර ගන්න.
image
පළමු පේළිය : #include<stdio.h>
මේක තමා  input/output header file එක විදියට භාවිතා කරන්නෙ.
දෙවන පේළිය : main()
මේක තමා වෑඩසටහන ක්‍රියාත්මක විමට ඈතුලුවන තෑන. වෑඩසටහනේ body එක වෙන්නෙ මේක තමා.body එක {..}  වලින් සමන්විත වෙලා තියෙන්නෙ.
තෙවන පේළිය : printf(“Hello Welcome to the C Programming “);
මේකෙන් තමා quotes ඈතුලෙ තියෙන statements print   කරලා පෙන්නන්නෙ. මේ library function  එකට main() එකෙන් කාතා කරනවා.
හතරවන පෙළිය : }
main() function body  එක අවසන් කරන්නේ මේකෙන් තමා.
ඕන්න ඉතින් අදට පාඩම ඉවරයි. මේක බලලා try එකක් දිලා ඔයලාගේ අදහස් දෙන්න.තවත් පාඩමකින් හමු වෙන තුරු ඔබ සෑමට ජය. :)













Saturday, January 8, 2011

The Unforgettable Day

d Today is the 7th of January in 2011. I'm standing on Microsoft Student Champ monthly meeting in January. at the end of the session wela came front of the audience and  start to speak about the new Microsoft Student Ambassadors. why this day is  unforgettable day for me. today is the one of greatest day of my life because i selected as a new Microsoft Student Ambassador(MSA)  in representing OUSL. so this is great experience for me after i being a champ. so came through in this community in last one half year time when I'm looking back  i gain a lot of experience in various sectors such as communication skills, technical stuff and i met  lot of valuable  personal in the industry through the champ community. i adding more thing to this i got a great experience working with student of various universities and share knowledge with them was a such wonderful memories in my life.i have to write many more things as like this about this community.

Now on onwards I'm working with this community as Microsoft Student Ambassador(MSA). so its more responsible than earlier and must be give my full support and all my skills to build up the this community as such great and leading student community in this country in this year working with my fellow ambassador. so i request all the students from IT related field come and join with us and Connect! Share !  Grow! …….
[ Now’s  Your  Time to Shine. ]

Friday, November 19, 2010

Chicken Submarine

csubToday i thought write something on different topic. It’s about Chicken Submarine of Dinemore (Sri Lanaka).specialty of Dinomore because its make me crazy on  to submarine. when we were in schooling some of weekends we went to Dinomore at kollupitiya (but no big experience in submarine as i remembered ).
Before i go to the Dinomore i had some experience and taste about specially on chicken submarine in KFC. In the time ago KFC  submarine was pretty good on taste. before three or four months ago  i went to KFC with my friends and ordered  chicken submarine. what the hell !.. when had two three  bite it was a…really crap ! as well as it was not well enough to price of it…
Then what to do i changed the place where we go ……its changed to Dinomore. Because their now located at kohuwala. the very first day of Dinomore at kohuwala  we ordered Chicken Submarine…it’s make we crazy on Chicken Submarine….late their introduce Spicy Chicken Submarine actually it’s was Thundory Chicken. i was  taste it on my birthday…hmmm..yameee !
Actually Dinomore Submarines are sometimes can’t handle on to single person because its that much of large one. The taste of it pretty good and it satisfies the cost of it. The reason behind the this post is today i went to Dinomore at kohuwala with one of my best  friend. it was time around 12 or 12.30 p.m. we had a two Chicken Submarine..hmmm..god..it  was cover the our hungry and as well as our lunch. 

Thursday, October 7, 2010

Windows Live Writer

images1 Today I thought to write something about the windows live writer. it is  amaze tool for bloggers. it simplify our work and save the time. we can set up multiple blogs in writer and this work with blogger, wordpress and more. you can write your post in live writer and can view the like as in blog post editor. In live writer have rich support of editing option and insert option which is can save draft of your post in blog and local hard drive. The live writer support with many plug-ins. so it will easer the the our work more than else in when we writing post in  the blog. we can see source code in live writer as well as in blog. using live writer you can create beautiful blog post quickly its format text, photos ,videos and maps (such as Bing and Google).you can download Windows Live Writer in this link  and  plug–in in this link.

Sunday, October 3, 2010

Infotel 2010 Exhibition

Another Infotel 2010 exhibition held on at BMICH. It was started 30th September 2010. i was attended to the exhibition today morning. my job was support to the Microsoft team with my fellow student champs. The first part of the day i join with Microsoft Multipoint Mouse Mischief. It was a  great tool to students and teachers to enhance their efficiency through easy learning method.
In second part i was join to support to the gaming competitions. Actually it was a great fun event and it attract the whole audience in the just second. our game based on the Xbox Console. the game was Moratal Combat. It was fantastic segment in the day.
after look around the exhibition i came to the home in evening. finally i got in to my mind is it was a another exhibition as looks like past. the thing is after finished the work on Microsoft stall i look around the other stalls there's nothing to see and get in to head. Most happening event is game zone in the exhibition area. there was no space to at least to walk through the that area and  there were full crowded.
when I'm leaving in exhibition area i got it in to my mind is, if there was no any gaming section there were no any younger crowed in the exhibition. so the future of IT and Communication depends on the youngest generation. so organizers must try to attract them not only to the gaming and also tot the other stuff.