One of the favorite interview questions when interviewing for a web developer jobs is on ASP.NET session state. In fact, the lack of knowledge about session state providers is a very big negative when you are applying for jobs that deal in high traffic sites running on multiple servers or web farms. One of my favorite questions is on what are the different session state providers in ASP.NET?
The answer is quite simple if you have ever added the <sessionState> element in a web.config:
ASP.NET session state supports several different storage options for session data. Each option is identified by a value in the SessionStateMode enumeration. The following list describes the available session state modes:
- InProc mode, which stores session state in memory on the Web server. This is the default.
- StateServer mode, which stores session state in a separate process called the ASP.NET state service. This ensures that session state is preserved if the Web application is restarted and also makes session state available to multiple Web servers in a Web farm.
- SQLServer mode stores session state in a SQL Server database. This ensures that session state is preserved if the Web application is restarted and also makes session state available to multiple Web servers in a Web farm.
- Custom mode, which enables you to specify a custom storage provider.
- Off mode, which disables session state.
In Process session mode
In-process mode stores session state values and variables in memory on the local Web server. This is the simplest of all settings and will fail to work in a web garden or web farm scenario.
<sessionState mode="InProc"
timeout="20"
cookieless="false">
State Server mode
StateServer mode stores session state in a process, referred to as the ASP.NET state service, that is separate from the ASP.NET worker process or IIS application pool. Using this mode ensures that session state is preserved if the Web application is restarted and also makes session state available to multiple Web servers in a Web farm.
To use StateServer mode, you must first be sure the ASP.NET state service is running on the server used for the session store. The ASP.NET state service is installed as a service when ASP.NET and the .NET Framework are installed. The ASP.Net state service is installed at the following location:
systemroot\Microsoft.NET\Framework\versionNumber\aspnet_state.exe
To configure an ASP.NET application to use StateServer mode, in the application's Web.config file do the following:
- Set the mode attribute of the sessionState element to StateServer.
- Set the stateConnectionString attribute to tcpip=serverName:42424.
<configuration>
<system.web><sessionState mode="StateServer"
stateConnectionString="tcpip=SampleStateServer:42424"
cookieless="false"
timeout="20"/>
</system.web>
</configuration>
SQL Server mode
- Set the mode attribute of the sessionState element to SQLServer.
- Set the sqlConnectionString attribute to a connection string for your SQL Server database.
<configuration>
<system.web>
<sessionState mode="SQLServer"
sqlConnectionString="Integrated Security=SSPI;data
source=SampleSqlServer;" />
</system.web>
</configuration>
Storing user session is a simple yet powerful concept that you should know in depth before you go for a web developer interview. Even if you have not used all the different modes, it is imperative that you learn about them and play with them. Hopefully, this article has given you enough to start with.
This is fabulous Man :) Thanks
ReplyDeleteGreat
ReplyDeleteGood one :)
ReplyDeletereally good one
ReplyDeleteThanks Yaar!!!!
ReplyDeleteThank u ! really very Helpfull for the information
ReplyDeletecool , Thanks a lot.
ReplyDeleteI liked it. How to use custom mode.
ReplyDeletevery nice information
ReplyDeleteGood
ReplyDeleteVery interesting and good Explanation
ReplyDeleteASP NET Training
ASP NET Training
ASP NET Online Training
C-Sharp Training
Dot Net Training in Chennai
Online .Net Training
MVC Training
WCF Training
Web-API Training
LINQ Training
Entity Framework
Training
Dot Net Interview Questions
Really Nice Blog. Thank you for Sharing. We are the best erp software providers in chennai. For more details call +91 9677025199 or email us on info@bravetechnologies.in ERP in Chennai | ERP Providers in Chennai
ReplyDeleteThanks for sharing informative article. Download Windows 7 ultimate for free from getintopc. It helps you to explore full functionality of windows operating system.
ReplyDeleteI would like to say thank you for the amazing details and concepts you are sharing in this.
ReplyDeleteWebseiten Gestaltung Lüdenscheid
I found a lot of interesting information here. A really good post
ReplyDeleteoffice 2010 professional plus key deutsch
I simply want to tell you that I am new to weblog and definitely liked this blog site. Very likely I’m going to bookmark your blog . You absolutely have wonderful stories. Cheers for sharing with us your blog. https://www.pageview.com/ Cool you inscribe, the info is really salubrious further fascinating, I'll give you a connect to my scene.
ReplyDeleteYou ought to basically fantastic not to mention solid advice, which means notice: Russian Escort in Jaipur
ReplyDeleteThis is the type of information I’ve long been trying to find. Thank you for writing this information. buy 50 likes instagram
ReplyDeleteThere has been a rise in the demand of data science as a subject in the universities, but unfortunately, there is not a particular curriculum which can be followed in this field since it is a very generalized field. data science course in hyderabad
ReplyDeleteThank you so much for sharing your brilliant thoughts with us. Visit Ogen Infosystem for professional Web Designing and SEO Services in Delhi, India.
ReplyDeleteWebsite Designing Company in Delhi
I always like to read a quality content having accurate information regarding the subject and the same thing I found in this post. Nice work
ReplyDeleteGST Registration
Best freight forwarders in india
ReplyDeletefreight forwarders in india
iso 27001 certification services
ReplyDeletehalal certification in delhi
iso 14001 certification in delhi
Thanks for the information. You have discussed an interesting topic that everybody should know. Keep posting these kind of posts.
ReplyDeleteWebsite: Imitation jewellery manufacturers
Thanks for sharing this nice information, Visit Webocity is website development company in delhi ncr , Best Website designing company in Delhi, We Offer Best Digital Marketing services in Delhi.
ReplyDeleteĐại lý vé máy bay Aivivu
ReplyDeleteVé máy bay đi Mỹ
vé máy bay từ seattle về việt nam
ve may bay tu canada ve viet nam
Lịch bay từ Seoul đến Hà Nội
giá vé máy bay từ anh về việt nam
các chuyến bay từ châu âu về việt nam
vé máy bay từ đức về việt nam
thông tin chuyến bay từ nga về việt nam
vé máy bay giá rẻ đi Los Angeles
cách ly khách sạn trọn gói
bookshelf recipe minecraft
ReplyDeleteminecraft grindstone recipe
how to make a stonecutter in minecraft
minecraft smoker
It is really a great information posting and i was searching for the same and have been satisfied after reading it,thanks for sharing new fantasy app
ReplyDeleteThis comment has been removed by the author.
ReplyDeletethanks for sharing nice reply cricket online games
ReplyDeleteI read your article it is very interesting and every concept is very clear, thank you so much for sharing. AWS Certification Course in Chennai
ReplyDeleteHere is the high DA Free Image Submission Sites list in India. PPT entry is the way of submitting your internet site link in PPT kind including your key phrase.
ReplyDeleterastgele görüntülü konuşma - kredi hesaplama - instagram video indir - instagram takipçi satın al - instagram takipçi satın al - tiktok takipçi satın al - instagram takipçi satın al - instagram beğeni satın al - instagram takipçi satın al - instagram takipçi satın al - instagram takipçi satın al - instagram takipçi satın al - binance güvenilir mi - binance güvenilir mi - binance güvenilir mi - binance güvenilir mi - instagram beğeni satın al - instagram beğeni satın al - polen filtresi - google haritalara yer ekleme - btcturk güvenilir mi - binance hesap açma - kuşadası kiralık villa - tiktok izlenme satın al - instagram takipçi satın al - sms onay - paribu sahibi - binance sahibi - btcturk sahibi - paribu ne zaman kuruldu - binance ne zaman kuruldu - btcturk ne zaman kuruldu - youtube izlenme satın al - torrent oyun - google haritalara yer ekleme - altyapısız internet - bedava internet - no deposit bonus forex - erkek spor ayakkabı - webturkey.net - karfiltre.com - tiktok jeton hilesi - tiktok beğeni satın al - microsoft word indir - misli indir
ReplyDeleteaşk kitapları
ReplyDeleteyoutube abone satın al
cami avizesi
cami avizeleri
avize cami
no deposit bonus forex 2021
takipçi satın al
takipçi satın al
takipçi satın al
takipcialdim.com/tiktok-takipci-satin-al/
instagram beğeni satın al
instagram beğeni satın al
btcturk
tiktok izlenme satın al
sms onay
youtube izlenme satın al
no deposit bonus forex 2021
tiktok jeton hilesi
tiktok beğeni satın al
binance
takipçi satın al
uc satın al
sms onay
sms onay
tiktok takipçi satın al
tiktok beğeni satın al
twitter takipçi satın al
trend topic satın al
youtube abone satın al
instagram beğeni satın al
tiktok beğeni satın al
twitter takipçi satın al
trend topic satın al
youtube abone satın al
takipcialdim.com/instagram-begeni-satin-al/
perde modelleri
instagram takipçi satın al
instagram takipçi satın al
takipçi satın al
instagram takipçi satın al
betboo
marsbahis
sultanbet
Aivivu chuyên vé máy bay, tham khảo
ReplyDeletevé máy bay đi Mỹ khứ hồi
bay về việt nam từ mỹ
mua vé máy bay từ nhật bản về việt nam
vé máy bay từ đức về việt nam giá rẻ
giá vé máy bay từ Vancouver về việt nam
Lịch bay từ Hàn Quốc về Việt Nam hôm nay
khách sạn cách ly ở cam ranh
takipçi satın al
ReplyDeletetakipçi satın al
takipçi satın al
marsbahis
ReplyDeletebetboo
sultanbet
marsbahis
betboo
sultanbet
Attractive component of the material. I just stumbled across your web site and accession capital to say that I really enjoyed your site. With just a few clicks, foreign nationals can apply for a Kenya visa on arrival from their home. Fill the form with accurate and complete information about the passenger's data.
ReplyDeletethanks admin good post marsbahis
ReplyDeletetrendbet
galabet
maltcasino
marsbahis
trendbet
maltcasino
galabet
The information you provided is very useful, thank you very much for sharing useful information with us. You can check the Azerbaijan visa requirement online. You can apply for a visa & pay Azerbaijan visa fee in just 5 minutes.
ReplyDeleteThis is really a good article. The Government of Ukraine grants the e-visa online. Do you have any idea about the Ukraine visa fees?. The Ukraine visa fee is dependent on your nationality and type of visa.
ReplyDeleteI continuously continue coming to your website once more simply in case you have posted new contents.
ReplyDeleteexperience design agency
Amazing post…. Travelers from around 169 countries can now apply for an online Indian visa application with 1 month, 5 years validity of 1 year. Travelers can opt for double or multiple entry, depending on the validity of the visa.
ReplyDeleteI really like your site it’s very impressive. Thanks for the inspiration! I really appreciate people like you!
ReplyDeletewebsite: Smoking Jackets
We believe in providing a top-quality digital marketing agency in Jacksonville, FL, businesses can trust with their digital growth. You can get the most out digital marketing agency jacksonville
ReplyDeleteNeed professional WordPress Web Design Services? We're experts in developing attractive mobile-friendly WordPress websites for businesses. Contact us today! https://just99marketing.com/wordpress-web-design
ReplyDeleteYour articles are so good to read thanks for sharing.
ReplyDeleteUmrah Packages 2023
love to read your blogs thanks for sharing.
ReplyDeleteAjwa dates