<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-752009706510472127</id><updated>2024-11-01T00:47:29.725-07:00</updated><title type='text'>Interview Questions</title><subtitle type='html'>Interesting Interview questions based on Microsoft Platform, .Net, Asp.Net, Agile methodologies, NHibernate and NUnit and other methodologies and technologies</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://interviewquestionz.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default'/><link rel='alternate' type='text/html' href='http://interviewquestionz.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Don</name><uri>http://www.blogger.com/profile/04437435568600310421</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggvdoVV_-0fc1VATz8G8Yrv3uUHoV6clOaplTcD2vag23MIQbEGPxUnb_NcEu9nCzPPhuDPGfPT2j3LYaV_rxgXZyxF09iZTYHt39uiby7UjWUtNODQ-n9LMmGzC2By8w/s220/IMG_5961.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-752009706510472127.post-1794157224178059483</id><published>2009-09-08T20:32:00.001-07:00</published><updated>2009-09-08T20:32:02.842-07:00</updated><title type='text'>UML 101</title><content type='html'>&lt;p align=&quot;justify&quot;&gt;So you need to read the entire UML book in 20 minutes. What do you do? These are the excerpts from the Unified Modeling Language Reference Manual I was reading and thought I could summarize for a quick refresh.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlrOczIPVhD8958XEkuXcY-dp1cQ5MFfk66iLH_HH7QMQjGCAORs-Xuh2g9QgdoBPILGWuz2-06zW03Yi88TsbQRAnRn25tSmKycRNoEsZVYZY5NElq19s3ubktIomOQlu7Ec6EZWVbpE/s1600-h/clip_image002%5B1%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;clip_image002&quot; border=&quot;0&quot; alt=&quot;clip_image002&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE8XbGlnBqzn4PW67QEgia5kxXQveXwCA_iXt3970NCrzrbd27_brfTaHHgypmIeNRgyFoxl57yHZktDOPd1jCLyCYzEQg41RnTOi3bxTc2jWpbpiY3wCLb2BAny_ro8tnKaHKtTdnFiY/?imgmax=800&quot; width=&quot;404&quot; height=&quot;348&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;b&gt;&lt;u&gt;Aggregation and composition:&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk6H3NTcp1CHDJShX-JJzoNRQXxMxdoLVDr8LwM77AhMDqh7zo7lQMg3IrPgcYrw4E8fX2E-cB1xWnPHrrufgDKKziFzG_uqW_9lXU9Gr36fHO1km_LnUBobNXki1O-Lo7XXEhLKfUueM/s1600-h/clip_image004%5B1%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;clip_image004&quot; border=&quot;0&quot; alt=&quot;clip_image004&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqVLreM_W5wXDrwALPk-GySE0yXC3ZtHeefPHDCgp6eLGrgqqIr3eAonRcTgstKZaDEFhyphenhyphenKVZks31eZMxcRLiLM1AA06KBxA6XTVVHtn0FdpU0J5OjTI3TcUExiSjSvLUZiUJmZ-sBeK4/?imgmax=800&quot; width=&quot;404&quot; height=&quot;170&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;b&gt;Generalization:&lt;/b&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdOqhGhRrcJoSp576BSbmO7HY6_8Se4IlszZxg20ph1dntDWAt3gQquN3A1sahMuDepYkgGIf-VZf5nuNeKFhYxeQc89ODj9YmqrhBLdevbwL9NvOCiKXfcQSK1V9AnDAZIh8zrog2q74/s1600-h/clip_image006%5B1%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;clip_image006&quot; border=&quot;0&quot; alt=&quot;clip_image006&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3w6vZtC_kSTZruuiYDhtl1dEm7QIGr6Y1-FIosxuaPyYqNVecP8hqCHgELg_6SQ6BNaKC5nOuhYR7b1q2hGSS1coLl-fHOu3qt-ox7w1kbG6p-7yUyi_H2sBaSRkPcoBduowEAJBM3Js/?imgmax=800&quot; width=&quot;404&quot; height=&quot;257&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;Kinds of dependencies:&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjinexGa6dbTCPK2E51i6Gb5LKTUsRWJBeC8Ts5CWhvHs75DR1M3gJG-gKLoTdCLSe1DvgVsbg04uuTidKUyqoYIGrtoaWi0BPNP9KlNbBsuthqZH59qig6uqeJEnnWFJxNoAO8Ow9kseM/s1600-h/clip_image008%5B1%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;clip_image008&quot; border=&quot;0&quot; alt=&quot;clip_image008&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijqC43ixZiCSKyuC04Fk0jGGxM9ZF95WebrJ26bbAtsOdmse9y7for6oHBGaWFudsReNI2Ly2qI0DosLkD3DVcjcZDXtJMi3xBlkNsdFzNe6gldJXTTP1TIOHOalJ4jf9xCowIR4zhMUk/?imgmax=800&quot; width=&quot;404&quot; height=&quot;611&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHKfQRhfryoBw_ztPtPX7HNRNG1Vi2gFSHvIScH8cT-QEK3C108g56TX_u8MGhyphenhyphente2-04ou_PkU-nF2CBc1SKlo40G9s67l9qhdEFB4pMsarU-9dzujr7kxeOsyFed_VYkInwLpQVVoy8/s1600-h/clip_image0104.jpg&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;clip_image010&quot; border=&quot;0&quot; alt=&quot;clip_image010&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoQrQmrpHiiFVJlktqC8CRbs6B3e1V6juK5KUeccC2F-RVFqyz0AuA464azU5F3Mw-R4Tz9tSABWqSq8U6A8h6TOK932MntMzUJqv3OGakXm_v7GSx6qaER1P6NzBcsbQZf8mCp8zdk78/?imgmax=800&quot; width=&quot;404&quot; height=&quot;116&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;b&gt;Use case diagram:&lt;/b&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6nfBdTQt7vGCLnaM3O3CDOkUDyDvD9hLi1h1Lz_f4L7-_qzhO1A6M7cBpu3S0AcNSfSTbhyWr2BqVvKaNlN4yxMeyhrMETKlFzfaIahU88oubGSdVI6UUpVc5AMGZ1H39g9b5hlQtcGE/s1600-h/clip_image012%5B1%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;clip_image012&quot; border=&quot;0&quot; alt=&quot;clip_image012&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkDClbeq4HOEh06ou0z2Zzotk1BZAZ7aMgY5NEQyHthRmkgq7kcpCIPOqWZCbumE-m5_CJkclNbhY9tIZ0oI-pSizJejwKbIuyR1ZdJQfP_JdeF50lgzB_PODvXBYoBdTPIw0xNwesdXk/?imgmax=800&quot; width=&quot;404&quot; height=&quot;335&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;b&gt;Kinds of Use Case relationships:&lt;/b&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3cwnOEiR6MdtcRXsT_NJ_t7nkwIIEt36ZDZjcoqyiKPoQXyzfaI26QjBjWCFeZGkR9ViXPhvGaC63XPDgJzGMcWYbi5H_4ct96acqArUnmyhG_twfLNpd9Q1fju-0lsotLEyF9gAgQVQ/s1600-h/clip_image014%5B1%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;clip_image014&quot; border=&quot;0&quot; alt=&quot;clip_image014&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTJTPXVgjPVDyCpPrQKUb4FTkof9vQOtvjPw5efRLOsq45MwS88p3IojrmVd2shDctIHt3NL0rgYeMClP-QFPTdId9ctldNe6LZNjNPLo0egC120EWjpZv29j6iU8l6eNo1v8PDZeXAf4/?imgmax=800&quot; width=&quot;404&quot; height=&quot;255&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNYDCjQXDXQi-P7cYvmZnjBUhOpk6UK15juUZmrFFk60A9Hfmrg-xvt9TVNP14VzgyFrHW_04xLm8PPbIKnbLAZa2sytjh7Trqk3djyH_ms-itnMeN37NTEwjhIkq2HaXOOwQXqevhgIo/s1600-h/clip_image016%5B1%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;clip_image016&quot; border=&quot;0&quot; alt=&quot;clip_image016&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0o06VGzL0EoG1l6M65biR3BifU69qjZARWjQjKW8cRecGn-DhO_d8H5maFv7ueEOzAmw3GuOUA_ONmYW2Cmna_k-l7kydMguIbsSgQbn5j9-_oxqbUZkf57VDE4bHIbY7Qk6XKbjfsGc/?imgmax=800&quot; width=&quot;404&quot; height=&quot;74&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT8kAUlh6ntzPeUksAz7d6SAXsbO4SEuR9cFjSITWTbJSqIW9fL7Oshmax3ORhpB5uA8J14waVXoXttlAIfs59FyocdeA4M8AHa-XMrVIy69Oua91qa56HLLBNotxPrblDHyKwdfXy-Zg/s1600-h/clip_image018%5B1%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;clip_image018&quot; border=&quot;0&quot; alt=&quot;clip_image018&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK9qo3219hyphenhyphenK4oskVnY3w2oJ87nODe4gKYtjLVPb13ZFGXj_pyDCgVdNi93Yls-nRDykjcvB9-NU3MnQSOLSFyCNU3pPZ0nCgmmD2V3T4D3r3O-67iD-rBsHKMI0yUyot_0VjBXXTcrZk/?imgmax=800&quot; width=&quot;404&quot; height=&quot;194&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja_lTEZ0ORdHJa7R_RlTZbQyGMuw7_brmEs4-3ENI89zZH3VLMWsrdECUMMGs-4wWfCmHQJa-eH49yUDyJFmO4wiztb1UC31PARo2Sus6Up_o_QRAJ6PdlWAUdX9Op7DMqZ4OH0JJpPes/s1600-h/clip_image020%5B1%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;clip_image020&quot; border=&quot;0&quot; alt=&quot;clip_image020&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrC8c9rgzc1s2cwPR1fIuTEj16DmvTOwRflzkSI1jXg6IaknbUJXWHDaiEXu3IiZMk2cARYzPsjZFz2ZpVER0cN6Dqmuc687dcoW4d_MF-nu6f5nl1Ydcxz94Zjw5w084v4kaySfb3k9Y/?imgmax=800&quot; width=&quot;404&quot; height=&quot;101&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_ccqdbhGCVDa6o9UuhFvu9Dsp8lJrCg4pwG6trUXEitvWbDgUaup6iYsfeyr-f6fKJGX23gtSkMhrFKYMaibdhTn6ydIWovtE-BVW8BinYcY2g2TT4D2sowPqM-MBIoWLeatUkV2TF-k/s1600-h/clip_image022%5B1%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;clip_image022&quot; border=&quot;0&quot; alt=&quot;clip_image022&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz8FAuABGQUDL9vLc3q4INhEsdTG-xihWpWZsrJzqA1E8-oXxmZS7cztaZu96vKKMdgfhkadxKjQgxg8bXlvr7rqaBnuxDo2smRbSP89A0qKg2dGvVwovYY-36TPGHwfjD7JSIi_U93Z8/?imgmax=800&quot; width=&quot;404&quot; height=&quot;71&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYcjwBwR-ZF8B4tHEkJx0gnl7mjsjU6KcGrlTZQCWWtiQBRcFCd5kLdfi9FX9bHdgcrfg08IstJGbgw8I9Xw2tTPIWDCeDMy1xy1h3sNrLoB9jI59WpMSeCvE243CGg9muP3aF3v4Ak_0/s1600-h/clip_image024%5B1%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;clip_image024&quot; border=&quot;0&quot; alt=&quot;clip_image024&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXvGNkLGWbDBSBLF9ZWJty3eXkjPyDw6tvomlVPAFvDVwoHU_ZNnlpXrfh07JZsh7WPC81mQoloTIh6f8Ezw_XGj70UrYL26xJObFrMfj8KRpV852ibPgpqE6SZIHehblHxAMRJ1TDRrI/?imgmax=800&quot; width=&quot;404&quot; height=&quot;380&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjch_6UBISbZfDb8AZHPrjpNhqLp29EG0YmfyIK3hz3o051XR9bLSBn5IeYSKxyAreWYdpCgHp-_P5cPSTvP33c64XYKaCpvXrrPyIbG1HaLB5wUhGHo0C0ozlcYt0-nWEMOYiFtw4en4w/s1600-h/clip_image0264.jpg&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;clip_image026&quot; border=&quot;0&quot; alt=&quot;clip_image026&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgExhCc5aai1iBgzJQLJeTJC_EzEIk9Ny9QH8Pje1O_O6V4uXMHZbR73pW4C_H2N9ZngSQFCZGEaVbr_NSkqaWbJKoKcervALwC79gP-agGVJRO_Cx6R3bZmrPnWor8JM2b6uZqbVFPlLs/?imgmax=800&quot; width=&quot;404&quot; height=&quot;553&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZG_6pmJq9OJ6G4cqWU6XR95ax972nt9TQPAV1foNyS4tHhPO0bhnt6H6iMMqlBXRl0L2nUxYnZga2InUVHxKDUyhTKO7KuxkkZmnaqVFVNkEl1C3v8tSEZ2HpiaetiLx2NVu42oYLXug/s1600-h/clip_image028%5B1%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;clip_image028&quot; border=&quot;0&quot; alt=&quot;clip_image028&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYbfERZIFQxDr8TllBdFNmUQ9r6ge024U6efYxgAgvSwBFi17Eao0jFQvUhwh4ydwjPnWmr5uSATNtMs_IPAfrfs41V1wuadIaboROCMys5QeZgwdLk3YeB_wpd6taN9PFdKGbDIMU3uU/?imgmax=800&quot; width=&quot;404&quot; height=&quot;419&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;b&gt;Activity Diagram:&lt;/b&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTNrM5bRm4jrynd0D65uHdElPXqS9u5hjURLw9nCrvDpe7qwYs4lOblUGYk1LEydqn8vIeXLtKMhNNzTXju_mpGrc2e5JlX1A7WvkK6UHV8nqUiA_C78WSBJR6zSEBtJYRakmRxVV_N3c/s1600-h/clip_image030%5B1%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;clip_image030&quot; border=&quot;0&quot; alt=&quot;clip_image030&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwQPsp-Kz6HULIcdkdjWh1N3jDmMRiI_Bx4TACjJwUGCH-yrMz4IBY70Bn1mgWNmjNmPd-q__zVqrsGFYwl51gWqvAZmev-u-G-z7AjSjwKKOvWjvyTChyphenhyphenThpjv1pf3UesGJhS0pl2S-U/?imgmax=800&quot; width=&quot;404&quot; height=&quot;435&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVrkfG7y2tvPS4wMy3U19IZ-DWboc8f55bNsNe4vVy0EVZ4mkF6JxzBwYyr_RA-lYp5U5b2myxGm8nvbm-SmbPpxSq5rmJ-wOMr9IIoSZdK1KrJSCKY12QvuJ-B1A9AmTczI9SvDkCaW0/s1600-h/clip_image032%5B1%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;clip_image032&quot; border=&quot;0&quot; alt=&quot;clip_image032&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0FXNNaHBIoXU8HeInMOVqdI15OLxCG5hkZhXjLW7H84z-O9OS1uE6JXorLoVOA9o3K2RFLdKJKF3d2ISpz9JZCuJvS6_VM0-nMlx0U6hJ86oGmzgHvFjgpZESpUqt3L3cqacQjsXLa1U/?imgmax=800&quot; width=&quot;404&quot; height=&quot;415&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;Sequence diagrams and Activation:&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl_J16iKJn1Qxsshc7VFVFMGqrOKekTjrFKeF5eWHAEFyglTyX-wRjAkbp5B8yfUhGKPSEEeMoppdNlFotG78cPSQPTuBTWQVLrRU9MS2gqb4xpjQenbmHU_vLA9ylCZNAPiAcvz3KIGk/s1600-h/clip_image034%5B1%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;clip_image034&quot; border=&quot;0&quot; alt=&quot;clip_image034&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWxSQxaCwcBVx4SFTKnb7yb40xOJopiUPWYZsrxow6tiYGq7N4cnOz5qzGftRVXJaTZwhNZcSi0GHbh-KXvxzExKsq3DKS3nXdI4bMS2V76wFwSPz-eNyAmQewME6yTtNQtCFSx8-CrwQ/?imgmax=800&quot; width=&quot;404&quot; height=&quot;235&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuUmX8WbUvg17KySHPGrjQ1tGZY8UgDc8gtKBxVBC1OU3CSzyTVMSLRraKpN4v12dc0n-VFPeHmt41ruDNaAzYmfC_dZ8X7P2vjbIR_GPa6Qe6Zjp_fZYc_SA3D9_5Z-2jtrUkdkMeaV0/s1600-h/clip_image036%5B1%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;clip_image036&quot; border=&quot;0&quot; alt=&quot;clip_image036&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-63WVOFVLqExFN3BdihlS7GGVljvSO8vkVFVlxgqE0qi_Zh9i02IYl_8kEOjPPTmcWBZn1JQdhgcbwKEmFUDuZWBQlMGDg1eStJ097c5US053ZvK9JGfSNEgVhv6tayTJGu-Q1-SQglQ/?imgmax=800&quot; width=&quot;404&quot; height=&quot;319&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPh9Mu4_V_CROONRovXQyWxp4diHyyhus8gzw_-yZFhTEK7O3-kJ0Jl8aDPf_F-luFjdmUccg2YlNFQvLOYnbqfHPeDxYvUpH6AQW0fMzc7IeBIWhf0PU-sorgVJSOG3Qb3_ZC7HravyM/s1600-h/clip_image038%5B1%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;clip_image038&quot; border=&quot;0&quot; alt=&quot;clip_image038&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe-u09pVc1z7hduiFo0-Ko0K14-vw_faNUmfU41baUEgdctXuCciHpyGA0Wa5XexLLNAv4GxQgBymV7yhQx3nYqRDqmTDICd0bsbe3AoS1kca8U07MNymQLl_erpU_jBJa6lRtZEf4Ybk/?imgmax=800&quot; width=&quot;404&quot; height=&quot;371&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;b&gt;Component Diagram:&lt;/b&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJvAZ0qx2-jWSivE3FHuEkXnMxDpB2JhY3RlJ3SQr95bx7tsp04OybYNpnepfoRXWYm11pEUwukMEqq8zv-fXjPPIq0kxwVZF_zYHze0HOx9xLl-5LocFVq4O9_Jh2PqixJ25Y2eNhyphenhyphenjA/s1600-h/clip_image040%5B1%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;clip_image040&quot; border=&quot;0&quot; alt=&quot;clip_image040&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBquMOvmh3Oc4KteaTngS9WNzYPWrDChDaqcK8F1r9sVtlNyAbxML6547_N6PDI0irzFIFB2uNefNsCXfxm7pHbm-mIlKlK2bjjWMoVLEfHgMDugDd0gQoMScnY3CmW4HFwH82KbYT8Ws/?imgmax=800&quot; width=&quot;404&quot; height=&quot;274&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;b&gt;Deployment Diagram:&lt;/b&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNwXup5UdacgyOR62VRAFNA5hOFyLNc4yrgzAT7_orG4vE2xy1FJjMDRwo48ybQBg16XIOlN4mghw32AmYBxaEB4ktnG1zQqnTfy4sX4o0N5AVvxHvV2vIjS-GDckatJ_2Ht28u8VFcTU/s1600-h/clip_image042%5B1%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;clip_image042&quot; border=&quot;0&quot; alt=&quot;clip_image042&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFuAv-mAgVdr3_iH09IdNoLrff3YH4JG5Qwis-SfS6eucHDYtyM0dt5L9b8IXecs49pjNWdI5HD9ugyKwcpkBo_8ZRy0Tu-mxsfULbKAAWEpq7y02hU0BFtiVCnpfP0tUkb5xUqmpshFg/?imgmax=800&quot; width=&quot;404&quot; height=&quot;292&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;b&gt;Packages and relationships:&lt;/b&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijQ6HnyGI01xhVo_OM0-UoID8YmXnWDA2C5FZc5AJKrZ1uXv68cJQp6_ayrwkB7IPfBzRlJLeSx4cZwpZuQCbyOcA1jGFVGu4Cs65nmAluPoQkPDGecqVFr1_zEvwue0EWnLR5JQxMz1w/s1600-h/clip_image044%5B1%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;clip_image044&quot; border=&quot;0&quot; alt=&quot;clip_image044&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUZCd7qG8sMcGxeNOuq5_qXmF_P4Yx7yDEqr87kAGUu3fscLULba0o6ET055eielQAdN4tEj3QqUHRXca2rUkd9yei-xi8wNO8wG0aadYybGufd8TCR-G99FoyIHVlRefGbvUuKqK8_HU/?imgmax=800&quot; width=&quot;404&quot; height=&quot;355&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://interviewquestionz.blogspot.com/feeds/1794157224178059483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/752009706510472127/1794157224178059483' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default/1794157224178059483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default/1794157224178059483'/><link rel='alternate' type='text/html' href='http://interviewquestionz.blogspot.com/2009/09/uml-101.html' title='UML 101'/><author><name>Don</name><uri>http://www.blogger.com/profile/04437435568600310421</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggvdoVV_-0fc1VATz8G8Yrv3uUHoV6clOaplTcD2vag23MIQbEGPxUnb_NcEu9nCzPPhuDPGfPT2j3LYaV_rxgXZyxF09iZTYHt39uiby7UjWUtNODQ-n9LMmGzC2By8w/s220/IMG_5961.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE8XbGlnBqzn4PW67QEgia5kxXQveXwCA_iXt3970NCrzrbd27_brfTaHHgypmIeNRgyFoxl57yHZktDOPd1jCLyCYzEQg41RnTOi3bxTc2jWpbpiY3wCLb2BAny_ro8tnKaHKtTdnFiY/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-752009706510472127.post-3014130316074342247</id><published>2009-08-18T13:05:00.001-07:00</published><updated>2009-08-18T13:05:26.854-07:00</updated><title type='text'>Left outer join in Entity Framework</title><content type='html'>&lt;p align=&quot;justify&quot;&gt;This evening I heard someone say that Left Outer Joins are not possible in Entity Framework or perhaps Left Outer Joins are possible, but they bring in all the data and then filter out the right table.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;I felt an urge to argue, but I resisted. I thought I would investigate before I waste time. I came up with some articles pretty quickly.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;     &lt;div align=&quot;justify&quot;&gt;&lt;a href=&quot;http://solidcoding.blogspot.com/2007/12/left-outer-join-in-linq.html&quot;&gt;Left Outer Join in LINQ&lt;/a&gt; &lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align=&quot;justify&quot;&gt;&lt;a href=&quot;http://social.msdn.microsoft.com/forums/en-US/adodotnetentityframework/thread/a3f2b146-750b-435c-b48c-2ea301bf130f/&quot;&gt;Left Outer Join using Inverse Navigation Property&lt;/a&gt; &lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align=&quot;justify&quot;&gt;&lt;a href=&quot;http://blogs.microsoft.co.il/blogs/gilf/archive/2008/05/14/how-why-use-definingquery-element.aspx&quot;&gt;DefiningQuery Element&lt;/a&gt; &lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align=&quot;justify&quot;&gt;&lt;a href=&quot;http://bhaidar.net/cs/archive/2007/08/01/left-outer-join-in-linq-to-sql.aspx&quot;&gt;Left Outer Join in LINQ to SQL&lt;/a&gt; &lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align=&quot;justify&quot;&gt;&lt;a href=&quot;http://stackoverflow.com/questions/78468/linq-to-entity-with-multiple-left-outer-joins&quot;&gt;LINQ to Entities with Multiple Left Outer Joins&lt;/a&gt; &lt;/div&gt;   &lt;/li&gt; &lt;/ol&gt;  &lt;p align=&quot;justify&quot;&gt;I am sure these should resolve all questions related to Left Outer Joins.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;Now about the performance and the question about how the data is brought, I am pretty sure we can prove that LINQ Queries all support deferred execution. But we can always prove that using the SQL Query Profiler.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;Hope this helps.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://interviewquestionz.blogspot.com/feeds/3014130316074342247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/752009706510472127/3014130316074342247' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default/3014130316074342247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default/3014130316074342247'/><link rel='alternate' type='text/html' href='http://interviewquestionz.blogspot.com/2009/08/left-outer-join-in-entity-framework.html' title='Left outer join in Entity Framework'/><author><name>Don</name><uri>http://www.blogger.com/profile/04437435568600310421</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggvdoVV_-0fc1VATz8G8Yrv3uUHoV6clOaplTcD2vag23MIQbEGPxUnb_NcEu9nCzPPhuDPGfPT2j3LYaV_rxgXZyxF09iZTYHt39uiby7UjWUtNODQ-n9LMmGzC2By8w/s220/IMG_5961.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-752009706510472127.post-1238355309205897128</id><published>2009-07-29T21:39:00.001-07:00</published><updated>2009-07-29T21:39:01.538-07:00</updated><title type='text'>Singleton Vs. Static Class</title><content type='html'>&lt;p align=&quot;justify&quot;&gt;Well I was asked this question once. “What is a singleton design pattern and why should I use it? Why not use a static class instead?” &lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;And it was quite surprising how it went. I said that Singleton is used when you need to maintain state. Static classes are used when you want to club together a bunch of stateless methods that do something irrespective of which instance calls these methods. Math class is a good example. &lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;So he asked me, can I not maintain state in a static class? So I said if you want to instantiate something in a static class how would you do it? And surprisingly he told me that he would do it in a static constructor. I asked him, is it possible to instantiate anything in the static constructor &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8BNbDaAkBduPqAt-Ax4dja4vs8nnrBxMxAnOQ-H4UpLisr-mjfgIjYTKOLHcgJu1ilNhYNuR4XSOYW6U_FnowDXtGMcA8yH2fEi2dCtkpvIv_nB1i86qWeq2piXE69L3XVpNf9i-SO6w/s1600-h/image%5B8%5D.png&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; margin: 5px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; align=&quot;left&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq0svJjDQ6TRjfSsait_HPZ-lShnXrgEZ43-jCo8kkbIb1HCL_1BqRFJl-WXYTH_5bGX-C-kyq0rpj6oMD9OFZXWGUdMBJiRK6gERonjngeF3a45ze_AKm7KyDAqaZevt8kQHJ-S83-bI/?imgmax=800&quot; width=&quot;341&quot; height=&quot;82&quot; /&gt;&lt;/a&gt;or even declare an instance type in a static class? And he asked me is it not possible? I said it is not as far as I know and he asked me if I am sure.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;Now the way the questions were asked about this subject, I was quite surprised. The interviewer looked quite convinced that instance types can be declared in a static class. I am surprised how he was allowed to take the interview in the first place. Or was he checking my confidence?&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;I wonder.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://interviewquestionz.blogspot.com/feeds/1238355309205897128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/752009706510472127/1238355309205897128' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default/1238355309205897128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default/1238355309205897128'/><link rel='alternate' type='text/html' href='http://interviewquestionz.blogspot.com/2009/07/singleton-vs-static-class.html' title='Singleton Vs. Static Class'/><author><name>Don</name><uri>http://www.blogger.com/profile/04437435568600310421</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggvdoVV_-0fc1VATz8G8Yrv3uUHoV6clOaplTcD2vag23MIQbEGPxUnb_NcEu9nCzPPhuDPGfPT2j3LYaV_rxgXZyxF09iZTYHt39uiby7UjWUtNODQ-n9LMmGzC2By8w/s220/IMG_5961.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq0svJjDQ6TRjfSsait_HPZ-lShnXrgEZ43-jCo8kkbIb1HCL_1BqRFJl-WXYTH_5bGX-C-kyq0rpj6oMD9OFZXWGUdMBJiRK6gERonjngeF3a45ze_AKm7KyDAqaZevt8kQHJ-S83-bI/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-752009706510472127.post-1201690306874855726</id><published>2007-04-19T05:34:00.000-07:00</published><updated>2008-12-10T13:09:11.437-08:00</updated><title type='text'>What are the different types of Asp.Net Session States?</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;ASP.NET Session State&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Session state still exists in ASP.NET, partly for backward compatibility, but also as a viable implementation that developers should no longer shy away from. ASP.NET session is free-threaded, but in some cases it can be accessed serially. Session state in ASP.NET still utilizes an HTTP cookie for managing the SessionID, however, ASP.NET also supports storing the SessionID in the URL if using cookies is not desirable. ASP.NET session state also supports two out-of- process modes to simplify deployment in Web server farms: out-of-process state server (StateServer), and out-of-process SQL Server (SQLServer). &lt;/span&gt;  &lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;In-Process Session State&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;ASP.NET defaults to what is known as in-process (InProc) session state. When in this mode, values stored within session state do not require serialization support and are stored within the memory space of the ASP.NET worker process. This behavior is identical to the way ASP stores its session data and has all the same shortcomings and limitations in a Web farm scenario. However, instead of the data being stored in the IIS process, the data is stored in managed memory within the ASP.NET worker process. (When ASP.NET is running on Microsoft Windows 2000, it defaults to the ASP.NET worker process aspnet_wp.exe. However, when ASP.NET is running on Microsoft Windows Server 2003, it will use the new IIS process model w3wp.exe.)&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;When stored in-process, session state data is lost whenever the process is recycled. In Microsoft Windows Server 2003 running IIS 6, the worker process automatically recycles every 29 hours, which is the default setting and is configurable. However, this does mean that every 29 hours the session data will be lost, whether it is 2:00 AM or 3:00 PM.&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;InProc is by far the fastest way to use session state. It doesn’t support Web farm scenarios (unless you enforce client affinity). However, it also doesn’t have the serialization and deserialization overhead associated with out-of-process modes. It’s safe to assume that out-of-process session state is 15–30 percent slower (depending upon variables such as network speed and the size of the object or objects being serialized). &lt;/span&gt;  &lt;span style=&quot;font-family:arial;&quot;&gt; Important  Use in-process session state (the default) if you have only a single server. In IIS 6, either use out-of-process or disable process recycling behavior to avoid data loss.&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Code Listing 5-1 shows the configuration settings from machine.config that specify the default settings for session state. Values that apply to InProc appear in bold.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Code Listing 5-1: In-Process Session State Configuration&lt;/span&gt;&lt;br /&gt;&lt;configuration  style=&quot;font-family:arial;&quot;&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration face=&quot;arial&quot;&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration face=&quot;arial&quot;&gt;&lt;configuration&gt;    &lt;system.web&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration face=&quot;arial&quot;&gt;&lt;configuration&gt;&lt;system.web&gt;        &lt;sessionstate mode=&quot;InProc&quot; stateconnectionstring=&quot;tcpip=127.0.0.1:42424&quot; statenetworktimeout=&quot;10&quot; sqlconnectionstring=&quot;...&quot; cookieless=&quot;false&quot; timeout=&quot;20&quot;&gt;   &lt;/sessionstate&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration face=&quot;arial&quot;&gt;&lt;configuration&gt;&lt;system.web&gt;&lt;sessionstate mode=&quot;InProc&quot; stateconnectionstring=&quot;tcpip=127.0.0.1:42424&quot; statenetworktimeout=&quot;10&quot; sqlconnectionstring=&quot;...&quot; cookieless=&quot;false&quot; timeout=&quot;20&quot;&gt;    &lt;/sessionstate&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration face=&quot;arial&quot;&gt;&lt;configuration&gt;&lt;system.web&gt;&lt;/system.web&gt; &lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration face=&quot;arial&quot;&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration face=&quot;arial&quot;&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration face=&quot;arial&quot;&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration face=&quot;arial&quot;&gt;&lt;configuration&gt;The timeout value specifies the time, in minutes, after which a session is considered timed out and its values can be removed. Session state uses a sliding expiration: the timeout is reset each time the item is requested. A session could theoretically be kept alive indefinitely if a request was made just once before the value in the timeout is reached. We’ll discuss the cookieless option later in the chapter.&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration face=&quot;arial&quot;&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration face=&quot;arial&quot;&gt;&lt;configuration&gt;The name of the HTTP cookie used to store the SessionID in ASP.NET is different from the cookie used to store the SessionID in ASP. There is no sharing of session data between ASP and ASP.NET. (See Chapter 11 for more details about migrating session state between ASP and ASP.NET.)&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration face=&quot;arial&quot;&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration face=&quot;arial&quot;&gt;&lt;configuration&gt;InProc session state allows any data type to be stored, and it participates in the global session events Session_OnStart, which is raised when a new session is created; and Session_OnEnd, which is raised when a session is abandoned. These events can be programmed in either global.asax or within an HTTP module.&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration face=&quot;arial&quot;&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration face=&quot;arial&quot;&gt;&lt;configuration&gt;Important  Don’t use the Session_End event; it can be called only for sessions created in the InProc mode. The event is not raised for sessions created in one of the out-of-process modes when sessions are abandoned.&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration face=&quot;arial&quot;&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration face=&quot;arial&quot;&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration face=&quot;arial&quot;&gt;&lt;configuration&gt;Although the InProc session is the fastest, in some cases, you might want to trade performance for reliability or ease of management. For example, the out-of-process option is a good choice when you want to support multiple Web servers, or when you want to guarantee that session data can survive the Web server process.&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration face=&quot;arial&quot;&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration face=&quot;arial&quot;&gt;&lt;configuration&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Out-of-Process Session State &lt;/span&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration face=&quot;arial&quot;&gt;&lt;configuration&gt;ASP.NET session state supports two out-of-process options, state server (StateServer) and SQL Server (SQLServer). Each has its own configuration settings and idiosyncrasies to contend with, such as managing stored types. The ASP.NET State Service is recommended for medium-size Web applications. For enterprise-size or highly-transactional Web applications, SQL Server is recommended.&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;Important  It’s important that the programming model is transparent. For example, we don’t have to change how we access or use session state when we change the storage mode.&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;We recommend SQLServer for out-of-process session state because it is just as fast as StateServer and SQL Server is excellent at managing data. Furthermore, ASP.NET can communicate with SQL Server natively (meaning internally, using the System.Data.SqlClient libraries), and SQL Server can be configured to support data failover scenarios. In cases in which SQLServer is not available, StateServer works well, but it unfortunately does not support data replication or failover scenarios.&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Managing Types for Out-of-Process Modes&lt;/span&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;If you’re using an out-of-process mode, one of your major costs is the serialization and deserialization of items stored. Using an optimized internal method, ASP.NET performs the serialization and deserialization of certain “basic” types, including numeric types of all sizes, such as Int, Byte, and Decimal, as well as several non-numeric types, such as String, DateTime, TimeSpan, Guid, IntPtr, and UintPtr.&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;If you have a session variable that is not one of the basic types, ASP.NET will serialize and deserialize it using the BinaryFormatter, which is relatively slower than the internal method. If you’ve created a custom class, and you want to store it in session state, you must mark it with the [Serializable] meta-data attribute or implement the ISerializable interface. ([Serializable] is the C# metadata attribute. &lt;serializable()&gt; is the Microsoft Visual Basic .NET metadata attribute.) The SerializableAttribute class is defined in the mscorlib.dll assembly within the System namespace. The ISerializable interface is defined in the assembly mscorlib.dll and within the System.Runtime.Serialization namespace. When a class is marked with the SerializableAttribute, all public members will attempt to be serialized. If the class contains references to other objects, those objects must also be marked with the SerializableAttribute or implement ISerializable. Implementing ISerializable gives you more control over how the serialization and deserialization of your class takes place. For more details on the serialization of objects in Visual Basic .NET, visit http://www.fawcette.com/reports/vsliveor/2002/09_18_02/hollis/.&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;&lt;serializable()&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;&lt;serializable()&gt;For the sake of performance, you’re better off storing all session state data using only one of the basic data types (numeric and non-numeric types) listed earlier. For example, if you want to store a name and address in session state, you can store them using two String session variables, which is the most efficient method; or you can create a class with two String members and store that class object in a session variable, which is more costly.&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;&lt;serializable()&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;&lt;serializable()&gt;Important  Store only basic data types in session state; avoid storing complex types or custom classes. Storing basic data types will decrease the serialization and deserialization costs associated with out-of-process session as well as reduce the complexity of the system.&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;&lt;serializable()&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;&lt;serializable()&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;&lt;serializable()&gt;Now that you’ve had an overview of out-of-process session, let’s discuss the two out-of-process modes, StateServer and SQLServer.&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;&lt;serializable()&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;&lt;serializable()&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;StateServer Mode&lt;/span&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;&lt;serializable()&gt;The StateServer out-of-process mode relies on a running Microsoft Windows NT Service as well as changes to the default configuration settings. Code Listing 5-2 shows machine.config with the necessary configuration settings (which appear in boldface) for StateServer. Note that the mode attribute is set to StateServer. The stateConnectionString and stateNetworkTimeout settings are required values for StateServer mode.&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;&lt;serializable()&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;&lt;serializable()&gt;Code Listing 5-2: StateServer Session State Configuration&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration&gt;&lt;serializable()&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;    &lt;system.web&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;system.web&gt;        &lt;sessionstate mode=&quot;StateServer&quot; stateconnectionstring=&quot;tcpip=127.0.0.1:42424&quot; statenetworktimeout=&quot;10&quot; cookieless=&quot;false&quot; timeout=&quot;20&quot;&gt;&lt;/sessionstate&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;system.web&gt;&lt;sessionstate mode=&quot;StateServer&quot; stateconnectionstring=&quot;tcpip=127.0.0.1:42424&quot; statenetworktimeout=&quot;10&quot; cookieless=&quot;false&quot; timeout=&quot;20&quot;&gt;    &lt;/sessionstate&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;system.web&gt;&lt;/system.web&gt; &lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;When ASP.NET is configured to use state server for out-of-process session, it uses a TCP/IP address and port number to send HTTP requests to the state server (which is in fact a lightweight Web server running as a Microsoft Windows Service).&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;The IP address (in stateConnectionString) must be changed to the IP address of the machine running the ASP.NET State Service. The port (the default is 42424), should also be changed unless the state service is running behind a firewall (which it should be). The port number can be configured on the machine running the service by editing the registry and changing the value of the port setting found in the following:&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;HKLM\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;As seen in Figure 5-1, the default setting for the port is 0x0000A5B8 in hexadecimal, or 42424 in base 10.&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;Figure 5-1: Changing the default port in the registry&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;a style=&quot;font-family: arial;&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY9Wenyk7ojt9m9us5qtre-ao3tjSXtfvtx66m5oLOtrB74U9zPX8h7lQSyq54PikePZAFddJ0Pjf22uFL2y5O8kVvnVhSzFjCjrSWZkOEgu_JtKuIsFwyZs85lWnKhpWGWLCtvwPUL3U/s1600-h/Figure+5-2.JPG&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY9Wenyk7ojt9m9us5qtre-ao3tjSXtfvtx66m5oLOtrB74U9zPX8h7lQSyq54PikePZAFddJ0Pjf22uFL2y5O8kVvnVhSzFjCjrSWZkOEgu_JtKuIsFwyZs85lWnKhpWGWLCtvwPUL3U/s320/Figure+5-2.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5055118459128239890&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;Tip  If the server running the state service is accessible outside the firewall, the port address of the state service should be changed to a value other than the default. In version 1.1 of ASP.NET, due to security reasons, only local machines can connect to the state server. To allow only non–local host requests in ASP.NET 1.1, open the same registry entry listed earlier for the port setting: HKLM\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\. Change AllowRemoteConnection to 1.&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;The value of stateNetworkTimeout represents the number of seconds that may elapse between the time ASP.NET tries to connect to the state service and the time the request times out. Although the default value for stateNetworkTimeout does not need to be changed, you have the option to make the value higher or lower depending upon your requirements.&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;Once the server designated to run the state server has been properly configured, it is simply a matter of starting the Windows service. The service can be started from either the command line or the Microsoft Management Console (MMC) for Services.&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;Starting the state service from the command line is simple. Navigate to the .NET Framework installation directory. For version 1, this is [system drive]\WINDOWS\Microsoft.NET\Framework\v1.0.3705\. Start the server by executing a net start command:&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;net start aspnet_state&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;After starting the service, you should see the following text: “The ASP.NET State Service service is starting. The ASP.NET State Service service was started successfully.”&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;The second option for starting the state service is through the Services MMC snap-in, which you open by navigating to Start\Administrative Tools\Services. Right-click on the ASP.NET State Service option in the list and select Start to start the service. Once the Services MMC is started, you should see a screen similar to Figure 5-2.&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;Figure 5-2: Services MMC with ASP.NET state service started&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;a style=&quot;font-family: arial;&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEif4TWV26sILY89BmaOzXgjboaQWHFrw5pF2G0guwtHi5SU75hJ9lQXRx1dNm0qEJiLGukknYZOSKNN1zveACFCxp9zgiZUZKtn4QM6KRMyXVzsrg3GWoH5klTBdcEGs86Ei8h0kqeA5d4/s1600-h/Figure+5-1.JPG&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEif4TWV26sILY89BmaOzXgjboaQWHFrw5pF2G0guwtHi5SU75hJ9lQXRx1dNm0qEJiLGukknYZOSKNN1zveACFCxp9zgiZUZKtn4QM6KRMyXVzsrg3GWoH5klTBdcEGs86Ei8h0kqeA5d4/s320/Figure+5-1.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5055117952322098946&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;SQL Server Mode&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;SQL Server is an enterprise-class database solution optimized for managing, storing, and retrieving data quickly and efficiently. It is also capable of replication and clustering. In a clustered environment, SQL Server can be configured to failover. For example, when the clustered production SQL server fails, a backup can take over.&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;Note that clustered SQL Server scenarios are not supported out of the box for ASP.NET session state. To enable the clustering or replication features of SQL Server, session data must be stored in a non-tempDB table.&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;Again, you do not need to make any special changes to the code to use SQL Server as the session state store. Code Listing 5-3 shows the necessary configuration file machine.config for SQL Server. (Configuration changes are in boldface code.)&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;Code Listing 5-3: SQL Server Session State Configuration&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/span&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;    &lt;system.web&gt;&lt;/system.web&gt;&lt;/span&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;        &lt;pages enablesessionstate=&quot;false&quot;&gt;&lt;/pages&gt;&lt;/span&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;    &lt;/span&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;    &lt;system.web&gt;        &lt;sessionstate mode=&quot;SQLServer&quot; sqlconnectionstring=&quot;database=[ServerName];                                           Trusted_Connection=true&quot; cookieless=&quot;false&quot; timeout=&quot;20&quot;&gt;    &lt;/sessionstate&gt;&lt;/system.web&gt;The mode attribute needs to be SQLServer, and the sqlConnectionString attribute must point to a server running SQL Server that has already been configured for ASP.NET SQL session state.&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;Tip  For ASP.NET 1, configure SQL Server for mixed-mode authentication by adding the ASPNET account enabled for the necessary SQL Server permissions (EXECUTE) for ASP.NET session state. (The ASPNET account is the user that the ASP.NET worker process runs as.) For ASP.NET 1.1 running on IIS 6, configure SQL Server for mixed-mode authentication by adding the NT AUTHORITY\NETWORK SERVICE account.&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;If the account has the necessary permissions, integrated authentication should be used. This prevents the need to store a username and password in clear text within the configuration. When integrated authentication is used, ASP.NET accesses SQL Server using the credentials of the Windows user that the worker process runs as. By default, these credentials are ASPNET and NT AUTHORITY\NETWORK SERVICE on Windows Server 2003 running IIS 6.&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;Important  Use integrated authentication rather than store SQL Server credentials within your configuration file. If you decide to use SQL Server user names and passwords, do not use the system administrator (sa) account. Instead use an account that has only the necessary access to the database object required for the operations (for session state, this account is EXECUTE only). If you must use SQL Server credentials, ASP.NET 1.1 supports storing credentials securely.&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;To configure SQL Server to support ASP.NET session state, either open the InstallSqlState.sql file in isqlw.exe (Microsoft SQL Server Query Analyzer), or use the command-line tool osql.exe. To use SQL Server Query Analyzer, from the Start menu, navigate to \All Programs\Microsoft SQL Server\Query Analyzer. The SQL Query Analyzer application appears in Figure 5-3.&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;Figure 5-3: SQL Query Analyzer&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;a style=&quot;font-family: arial;&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7d6oEl8eoQj32zLzcbWjgP4_tJmqbynmZQ1a-VByTifeILnlNeM8MKYKkOhd4mGg85J4XzHWJ9279Sb0yIhs2u6xs2aS_uHMf5O2Uez_LVTk4IQrb_bwsJWHZojhL6OgoUlZNRHhwRTU/s1600-h/Figure+5-3.JPG&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7d6oEl8eoQj32zLzcbWjgP4_tJmqbynmZQ1a-VByTifeILnlNeM8MKYKkOhd4mGg85J4XzHWJ9279Sb0yIhs2u6xs2aS_uHMf5O2Uez_LVTk4IQrb_bwsJWHZojhL6OgoUlZNRHhwRTU/s320/Figure+5-3.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5055118794135688994&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;Important  Ensure SQL Server Agent is running before running the SQL Scripts. The agent runs a periodic job to purge expired sessions from the database.&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;If you’re running ASP.NET 1, from the toolbar select File | Open [system drive]\WINDOWS\Microsoft.NET\Framework\v1.0.3705\ InstallSqlState.sql. If you’re running ASP.NET 1.1, navigate to [system drive]\WINDOWS\Microsoft.NET\Framework\v1.0.4322\ directory and open the same file. Execute the script, either by clicking the Play button or by pressing F5. Using the command-line tool (osql.exe), open a command window and then navigate to \[system drive]\WINDOWS\Microsoft.NET\Framework\[ASP.NET version]\.&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;If integrated authentication is enabled for SQL Server and the current Windows logged-on user has permissions to SQL Server, type the following: osql -E &lt; enablesessionstate=&quot;&quot;&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;Another option is to configure session to enableSessionState=“false” as the default setting (you can change this in web.config or machine.config) and use EnableSessionState=“ReadOnly” or EnableSessionState=“true” at the page level. Code Listing 5-4 shows the code for disabling session state.&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;Code Listing 5-4: Disabling Session State&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;    &lt;system.web&gt;        &lt;pages enablesessionstate=&quot;false&quot;&gt;    &lt;/pages&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;pre class=&quot;programlisting&quot;  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;background-color: rgb(192, 192, 192);&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;configuration&gt;&lt;br /&gt;&lt;system.web&gt;&lt;br /&gt;   &lt;pages enablesessionstate=&quot;false&quot;&gt;&lt;br /&gt;&lt;/pages&gt;&lt;br /&gt;&lt;/system.web&gt;  &lt;/configuration&gt;&lt;/span&gt;&lt;/span&gt; &lt;/pre&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;Important  For out-of-process session, set session state to enableSessionState=“false” within the configuration file and set the EnableSessionState page directives to either true or ReadOnly based on what behavior is needed. Note that the length of the session will still be reset (even when set to false).&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;When you apply this strategy for optimizing out-of-process session, you get fewer requests to the out-of-process session store, which increases the scalability and throughput of the site.&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;Cookieless Session&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;Session state, to HTTP purists, is a frowned upon but necessary feature for building real-world Web applications. Session state was designed to work around the limitations of the stateless nature of HTTP. To do so, the browser and the server must share a common piece of data: the SessionID. This shared value must be stored somewhere—we’re certainly not going to ask the user to re-enter an ID value upon each request to the server! To solve this problem, we take advantage of another HTTP feature known as a cookie, which you learned about briefly earlier in the chapter.&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;A cookie is a highly contentious, much debated feature supported by all browsers that allows the server to store a small amount of data, private to the server, on the client. Upon each client request to the server, the browser sends along any cookie data belonging to that server.&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;For both ASP and ASP.NET, the SessionID is stored within a cookie. When the client makes requests to the server, the client presents the cookie, giving ASP.NET the opportunity to fetch any associated session data belonging to the presented SessionID.&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;Important  Using the SessionID as a key for user data is not recommended. The SessionID is randomly generated, and session data—as well as session IDs—do expire. Additionally, although a SessionID might be generated on each request, a SessionID is set only when a Session value is set server side. This means that if no session values are set server side, new SessionIDs are issued on each request.&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;Storing the SessionID in a cookie works very well except when the client chooses not to accept cookies. (By default, cookies are accepted, and the user has to explicitly disable cookie support to avoid using them.) When cookies are not supported, ASP.NET provides a cookieless option in which the SessionID is stored within the URL instead of an HTTP cookie.&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;An ASP.NET Web application cannot be configured to support both cookie and cookieless SessionID storage; that is, the application cannot dynamically choose whether to use cookies. This can be seen as advantageous because designing an application to accommodate various cookie scenarios can be very difficult.&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;When building applications to take advantage of a cookieless session, you must carefully design navigation in the user interface. Any links within the site that are not relative (those starting with http://) will cause the user to lose her session when clicked. For relative URLs (for example, /MyStore/default.aspx), the embedded SessionID is automatically added by ASP.NET when generating the page output.&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;Tip  If you have to develop an application that supports both cookie and cookieless sessions, your best strategy is to write an HTTP module to redirect the browser to the appropriate application or server for the supported browser feature, for example, configure a dedicated application that is used for cookieless sessions.&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration style=&quot;font-family: arial;&quot;&gt;&lt;serializable()&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/configuration&gt;&lt;/serializable()&gt;&lt;/configuration&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewquestionz.blogspot.com/feeds/1201690306874855726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/752009706510472127/1201690306874855726' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default/1201690306874855726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default/1201690306874855726'/><link rel='alternate' type='text/html' href='http://interviewquestionz.blogspot.com/2007/04/what-are-different-types-of-aspnet.html' title='What are the different types of Asp.Net Session States?'/><author><name>Don</name><uri>http://www.blogger.com/profile/04437435568600310421</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggvdoVV_-0fc1VATz8G8Yrv3uUHoV6clOaplTcD2vag23MIQbEGPxUnb_NcEu9nCzPPhuDPGfPT2j3LYaV_rxgXZyxF09iZTYHt39uiby7UjWUtNODQ-n9LMmGzC2By8w/s220/IMG_5961.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY9Wenyk7ojt9m9us5qtre-ao3tjSXtfvtx66m5oLOtrB74U9zPX8h7lQSyq54PikePZAFddJ0Pjf22uFL2y5O8kVvnVhSzFjCjrSWZkOEgu_JtKuIsFwyZs85lWnKhpWGWLCtvwPUL3U/s72-c/Figure+5-2.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-752009706510472127.post-1605224637449279939</id><published>2007-04-19T03:26:00.000-07:00</published><updated>2007-04-19T03:35:54.580-07:00</updated><title type='text'>if you use xml formatter to serialize an object, would the private properties be serialized? What happens when you use a binary formatter?</title><content type='html'>XML Formatter does not serialize private properties. Serialization is the process of storing the state of an object into a persistence storage media and private properties are not serialized. Serialization has nothing to do with Private Properties. &lt;br /&gt;&lt;br /&gt;When using Binary formatter, the private properties are serialized. Since it is a binary formatter, it just writes everything it reads from the object into the persistent storage media. Hence the private variables would also be persisted. But logically they should not be and using an XML Formatter is more advisable.</content><link rel='replies' type='application/atom+xml' href='http://interviewquestionz.blogspot.com/feeds/1605224637449279939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/752009706510472127/1605224637449279939' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default/1605224637449279939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default/1605224637449279939'/><link rel='alternate' type='text/html' href='http://interviewquestionz.blogspot.com/2007/04/if-you-use-xml-formatter-to-serialize.html' title='if you use xml formatter to serialize an object, would the private properties be serialized? What happens when you use a binary formatter?'/><author><name>Don</name><uri>http://www.blogger.com/profile/04437435568600310421</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggvdoVV_-0fc1VATz8G8Yrv3uUHoV6clOaplTcD2vag23MIQbEGPxUnb_NcEu9nCzPPhuDPGfPT2j3LYaV_rxgXZyxF09iZTYHt39uiby7UjWUtNODQ-n9LMmGzC2By8w/s220/IMG_5961.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-752009706510472127.post-5166354327546371055</id><published>2007-04-19T03:18:00.000-07:00</published><updated>2007-04-19T03:19:00.055-07:00</updated><title type='text'>What is an assembly?</title><content type='html'>An assembly is the primary building block of a .NET Framework application. It is a collection of functionality that is built, versioned, and deployed as a single implementation unit (as one or more files). All managed types and resources are marked either as accessible only within their implementation unit, or as accessible by code outside that unit. &lt;br /&gt;&lt;br /&gt;Assemblies are self-describing by means of their manifest, which is an integral part of every assembly. The manifest: &lt;br /&gt;&lt;br /&gt;Establishes the assembly identity (in the form of a text name), version, culture, and digital signature (if the assembly is to be shared across applications). &lt;br /&gt;Defines what files (by name and file hash) make up the assembly implementation. &lt;br /&gt;Specifies the types and resources that make up the assembly, including which are exported from the assembly. &lt;br /&gt;&lt;br /&gt;Itemizes the compile-time dependencies on other assemblies. &lt;br /&gt;Specifies the set of permissions required for the assembly to run properly. &lt;br /&gt;This information is used at run time to resolve references, enforce version binding policy, and validate the integrity of loaded assemblies. The runtime can determine and locate the assembly for any running object, since every type is loaded in the context of an assembly. Assemblies are also the unit at which code access security permissions are applied. The identity evidence for each assembly is considered separately when determining what permissions to grant the code it contains. &lt;br /&gt;The self-describing nature of assemblies also helps makes zero-impact install and XCOPY deployment feasible.</content><link rel='replies' type='application/atom+xml' href='http://interviewquestionz.blogspot.com/feeds/5166354327546371055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/752009706510472127/5166354327546371055' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default/5166354327546371055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default/5166354327546371055'/><link rel='alternate' type='text/html' href='http://interviewquestionz.blogspot.com/2007/04/what-is-assembly.html' title='What is an assembly?'/><author><name>Don</name><uri>http://www.blogger.com/profile/04437435568600310421</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggvdoVV_-0fc1VATz8G8Yrv3uUHoV6clOaplTcD2vag23MIQbEGPxUnb_NcEu9nCzPPhuDPGfPT2j3LYaV_rxgXZyxF09iZTYHt39uiby7UjWUtNODQ-n9LMmGzC2By8w/s220/IMG_5961.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-752009706510472127.post-618726102503849128</id><published>2007-04-19T03:08:00.000-07:00</published><updated>2007-04-19T03:14:18.376-07:00</updated><title type='text'>How can I see what assemblies are installed in the global assembly cache?</title><content type='html'>The .NET Framework ships with a Windows shell extension for viewing the assembly cache. Navigating to % windir%\assembly with the Windows Explorer activates the viewer.</content><link rel='replies' type='application/atom+xml' href='http://interviewquestionz.blogspot.com/feeds/618726102503849128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/752009706510472127/618726102503849128' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default/618726102503849128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default/618726102503849128'/><link rel='alternate' type='text/html' href='http://interviewquestionz.blogspot.com/2007/04/how-can-i-see-what-assemblies-are.html' title='How can I see what assemblies are installed in the global assembly cache?'/><author><name>Don</name><uri>http://www.blogger.com/profile/04437435568600310421</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggvdoVV_-0fc1VATz8G8Yrv3uUHoV6clOaplTcD2vag23MIQbEGPxUnb_NcEu9nCzPPhuDPGfPT2j3LYaV_rxgXZyxF09iZTYHt39uiby7UjWUtNODQ-n9LMmGzC2By8w/s220/IMG_5961.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-752009706510472127.post-4816973192108006879</id><published>2007-04-19T03:06:00.000-07:00</published><updated>2007-04-19T03:07:15.702-07:00</updated><title type='text'>What is the difference between Aggregation and Composition</title><content type='html'>As Robert C. Martin Explains it:&lt;br /&gt;&lt;br /&gt;Association represents the ability of one instance to send a message to another instance. This is typically implemented with a pointer or reference instance variable, although it might also be implemented as a method argument, or the creation of a local variable.&lt;br /&gt;&lt;br /&gt;[Example:]&lt;br /&gt;&lt;br /&gt;|A|-----------&gt;|B|&lt;br /&gt;&lt;br /&gt;class A&lt;br /&gt;{&lt;br /&gt;  private:&lt;br /&gt;    B* itsB;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;Aggregation [...] is the typical whole/part relationship. This is exactly the same as an association with the exception that instances cannot have cyclic aggregation relationships (i.e. a part cannot contain its whole).&lt;br /&gt;&lt;br /&gt;[Example:]&lt;br /&gt;&lt;br /&gt;|Node|&lt;&gt;--------&gt;|Node|&lt;br /&gt;&lt;br /&gt;class Node&lt;br /&gt;{&lt;br /&gt;  private:&lt;br /&gt;    vector&lt;Node*&gt; itsNodes;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;The fact that this is aggregation means that the instances of Node cannot form a cycle. Thus, this is a Tree of Nodes not a graph of Nodes.&lt;br /&gt;&lt;br /&gt;Composition [...] is exactly like Aggregation except that the lifetime of the &#39;part&#39; is controlled by the &#39;whole&#39;. This control may be direct or transitive. That is, the &#39;whole&#39; may take direct responsibility for creating or destroying the &#39;part&#39;, or it may accept an already created part, and later pass it on to some other whole that assumes responsibility for it.&lt;br /&gt;&lt;br /&gt;[Example:]&lt;br /&gt;&lt;br /&gt;|Car|&lt;#&gt;--------&gt;|Carburetor|&lt;br /&gt;&lt;br /&gt;class Car&lt;br /&gt;{&lt;br /&gt;  public:&lt;br /&gt;    virtual ~Car() {delete itsCarb;}&lt;br /&gt;  private:&lt;br /&gt;    Carburetor* itsCarb&lt;br /&gt;};</content><link rel='replies' type='application/atom+xml' href='http://interviewquestionz.blogspot.com/feeds/4816973192108006879/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/752009706510472127/4816973192108006879' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default/4816973192108006879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default/4816973192108006879'/><link rel='alternate' type='text/html' href='http://interviewquestionz.blogspot.com/2007/04/what-is-difference-between-aggregation.html' title='What is the difference between Aggregation and Composition'/><author><name>Don</name><uri>http://www.blogger.com/profile/04437435568600310421</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggvdoVV_-0fc1VATz8G8Yrv3uUHoV6clOaplTcD2vag23MIQbEGPxUnb_NcEu9nCzPPhuDPGfPT2j3LYaV_rxgXZyxF09iZTYHt39uiby7UjWUtNODQ-n9LMmGzC2By8w/s220/IMG_5961.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-752009706510472127.post-2451097038748519862</id><published>2007-04-19T02:39:00.000-07:00</published><updated>2007-04-19T02:40:49.696-07:00</updated><title type='text'>How do you modify Code Access Security Policy?</title><content type='html'>The Code Access Security Policy tool enables users and administrators to modify security policy for the machine policy level, the user policy level, and the enterprise policy level.&lt;br /&gt;&lt;br /&gt;http://msdn2.microsoft.com/en-us/library/cb6t8dtz(VS.80).aspx</content><link rel='replies' type='application/atom+xml' href='http://interviewquestionz.blogspot.com/feeds/2451097038748519862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/752009706510472127/2451097038748519862' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default/2451097038748519862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default/2451097038748519862'/><link rel='alternate' type='text/html' href='http://interviewquestionz.blogspot.com/2007/04/how-do-you-modify-code-access-security.html' title='How do you modify Code Access Security Policy?'/><author><name>Don</name><uri>http://www.blogger.com/profile/04437435568600310421</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggvdoVV_-0fc1VATz8G8Yrv3uUHoV6clOaplTcD2vag23MIQbEGPxUnb_NcEu9nCzPPhuDPGfPT2j3LYaV_rxgXZyxF09iZTYHt39uiby7UjWUtNODQ-n9LMmGzC2By8w/s220/IMG_5961.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-752009706510472127.post-1533803058590989324</id><published>2007-04-19T00:12:00.000-07:00</published><updated>2007-04-19T00:19:12.742-07:00</updated><title type='text'>What would you have to do to implement an asynchronous Web service method</title><content type='html'>&lt;div class=&quot;section&quot; id=&quot;procedureSection0&quot;&gt; &lt;ol&gt;&lt;li&gt; &lt;p&gt;Split a synchronous Web service method into two methods, each with the same  base name, one with that name starting with Begin and the other End. &lt;/p&gt; &lt;/li&gt;&lt;li&gt; &lt;p&gt;The parameter list for the Begin method contains all the in and by reference  parameters for the method&#39;s functionality plus two additional parameters.&lt;/p&gt; &lt;ul&gt;&lt;li&gt; &lt;p&gt;&lt;i&gt;By reference&lt;/i&gt; parameters are listed as &lt;i&gt;in&lt;/i&gt; parameters. &lt;/p&gt; &lt;/li&gt;&lt;li&gt; &lt;p&gt;The second from the last parameter must be an &lt;b&gt;AsyncCallback&lt;/b&gt;. The  &lt;b&gt;AsyncCallback&lt;/b&gt; parameter allows a client to supply a delegate, which is  invoked when the method completes. When an asynchronous Web service method calls  another asynchronous method, this parameter can be passed into the second from  last parameter for that method. &lt;/p&gt; &lt;/li&gt;&lt;li&gt; &lt;p&gt;The last parameter is an &lt;b&gt;Object&lt;/b&gt;. The &lt;b&gt;Object&lt;/b&gt; parameter allows a  caller to supply state information to the method. When an asynchronous Web  service method calls another asynchronous method, this parameter can be passed  into the last parameter for that method.&lt;/p&gt; &lt;/li&gt;&lt;li&gt; &lt;p&gt;The return value must be of type &lt;b&gt;IAsyncResult&lt;/b&gt;.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt; &lt;p&gt;The parameter list for the &lt;i&gt;End&lt;/i&gt; method consists of an  &lt;b&gt;IAsyncResult&lt;/b&gt; followed by any &lt;i&gt;out&lt;/i&gt; and &lt;i&gt;by reference&lt;/i&gt;  parameters specific to the method&#39;s functionality.&lt;/p&gt; &lt;ul&gt;&lt;li&gt; &lt;p&gt;The return value is the same type as the return value of a synchronous Web  service method.&lt;/p&gt; &lt;/li&gt;&lt;li&gt; &lt;p&gt;&lt;i&gt;By reference&lt;/i&gt; parameters are listed as &lt;i&gt;out&lt;/i&gt;  parameters.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt; &lt;h1 class=&quot;heading&quot;&gt;&lt;span style=&quot;font-size:78%;&quot;&gt;Example&lt;/span&gt;&lt;/h1&gt; &lt;div class=&quot;section&quot; id=&quot;codeExampleSection&quot;&gt; &lt;div class=&quot;code&quot; id=&quot;ctl00_LibFrame_ctl10_CSharp&quot;&gt;&lt;pre class=&quot;code&quot; id=&quot;ctl00_LibFrame_ctl10CSharp&quot; space=&quot;preserve&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style=&quot;color:blue;&quot;&gt;using&lt;/span&gt; System.Web.Services;&lt;br /&gt;&lt;br /&gt;[WebService(Namespace=&quot;http:&lt;span style=&quot;color:green;&quot;&gt;//www.contoso.com/&quot;)]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color:blue;&quot;&gt;class&lt;/span&gt; MyService : WebService&lt;br /&gt;{&lt;br /&gt;&lt;span style=&quot;color:blue;&quot;&gt;public&lt;/span&gt; RemoteService remoteService;&lt;br /&gt;&lt;span style=&quot;color:blue;&quot;&gt;public&lt;/span&gt; MyService()&lt;br /&gt;{&lt;br /&gt;  &lt;span style=&quot;color:green;&quot;&gt;// Create a new instance of proxy class for &lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color:green;&quot;&gt;// the Web service to be called.&lt;/span&gt;&lt;br /&gt;  remoteService = &lt;span style=&quot;color:blue;&quot;&gt;new&lt;/span&gt; RemoteService();&lt;br /&gt;}&lt;br /&gt;&lt;span style=&quot;color:green;&quot;&gt;// Define the Begin method.&lt;/span&gt;&lt;br /&gt;[WebMethod]&lt;br /&gt;&lt;span style=&quot;color:blue;&quot;&gt;public&lt;/span&gt; IAsyncResult BeginGetAuthorRoyalties(String Author,&lt;br /&gt;  AsyncCallback callback, object asyncState)&lt;br /&gt;{&lt;br /&gt;  &lt;span style=&quot;color:green;&quot;&gt;// Begin asynchronous communictation with a different XML Web&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color:green;&quot;&gt;// service.&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;return&lt;/span&gt; remoteService.BeginReturnedStronglyTypedDS(Author,&lt;br /&gt;      callback,asyncState);&lt;br /&gt;}&lt;br /&gt;&lt;span style=&quot;color:green;&quot;&gt;// Define the End method.&lt;/span&gt;&lt;br /&gt;[WebMethod]&lt;br /&gt;&lt;span style=&quot;color:blue;&quot;&gt;public&lt;/span&gt; AuthorRoyalties EndGetAuthorRoyalties(IAsyncResult&lt;br /&gt;  asyncResult)&lt;br /&gt;{&lt;br /&gt;  &lt;span style=&quot;color:green;&quot;&gt;// Return the asynchronous result from the other Web service.&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;return&lt;/span&gt; remoteService.EndReturnedStronglyTypedDS(asyncResult);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewquestionz.blogspot.com/feeds/1533803058590989324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/752009706510472127/1533803058590989324' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default/1533803058590989324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default/1533803058590989324'/><link rel='alternate' type='text/html' href='http://interviewquestionz.blogspot.com/2007/04/what-would-you-have-to-do-to-make-web.html' title='What would you have to do to implement an asynchronous Web service method'/><author><name>Don</name><uri>http://www.blogger.com/profile/04437435568600310421</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggvdoVV_-0fc1VATz8G8Yrv3uUHoV6clOaplTcD2vag23MIQbEGPxUnb_NcEu9nCzPPhuDPGfPT2j3LYaV_rxgXZyxF09iZTYHt39uiby7UjWUtNODQ-n9LMmGzC2By8w/s220/IMG_5961.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-752009706510472127.post-566556421347249033</id><published>2007-04-18T22:57:00.000-07:00</published><updated>2007-04-18T23:34:41.932-07:00</updated><title type='text'>Interface Inheritance</title><content type='html'>Is interface inheritance possible? Why is it required? why wouldn&#39;t I implement 2 interfaces instead of doing an interface inheritance?&lt;br /&gt;&lt;br /&gt;Ans: Suppose there is a class that I want to function as a Bank Account. Now there are 5 classes that are 5 different types of Bank Accounts which have a function CalculateInterest(). I would define an interface called IBankAccount Interface and implement this interface in my 5 classes to make them BankAccounts. Now I want one bank account to do something special. It should contain all the existing functions of a normal bank account and should specialize in something.&lt;br /&gt;&lt;br /&gt;So I would create a new Interface say, ISpecialBankAccount and inherit it from IBankAccount. Now in my special class I would implement ISpecialBankAccount.&lt;br /&gt;&lt;br /&gt;Now I can omit the inheritance of interfaces and implement both these interfaces. And from the code perspective it would be the same thing. But when I am breaking the rules of OO. From a design perspective it would make more logical sense. because ISpecialBankAccount would contain all the functions of the IBankAccount interface and it would add special functionality to it.&lt;br /&gt;&lt;br /&gt;So Implementing ISpecialBankAccount in our special class would keep the existing bank account as they are and would also have special features of the ISpecialBankAccount.</content><link rel='replies' type='application/atom+xml' href='http://interviewquestionz.blogspot.com/feeds/566556421347249033/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/752009706510472127/566556421347249033' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default/566556421347249033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/752009706510472127/posts/default/566556421347249033'/><link rel='alternate' type='text/html' href='http://interviewquestionz.blogspot.com/2007/04/interface-inheritance.html' title='Interface Inheritance'/><author><name>Don</name><uri>http://www.blogger.com/profile/04437435568600310421</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggvdoVV_-0fc1VATz8G8Yrv3uUHoV6clOaplTcD2vag23MIQbEGPxUnb_NcEu9nCzPPhuDPGfPT2j3LYaV_rxgXZyxF09iZTYHt39uiby7UjWUtNODQ-n9LMmGzC2By8w/s220/IMG_5961.JPG'/></author><thr:total>0</thr:total></entry></feed>