<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Nikhil's Blog</title><subtitle type="html">A .NET dev generalist blog covering pretty much everything under the sun of .NET.</subtitle><id>http://blogs.msdn.com/nikhiln/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nikhiln/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/nikhiln/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2007-05-04T13:41:00Z</updated><entry><title>Commerce Server 2007 Staging Error: CatalogImport failed; _FullTextCatalog' cannot be reused until after the next BACKUP LOG operation</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nikhiln/archive/2009/01/19/commerce-server-2007-staging-error-catalogimport-failed-fulltextcatalog-cannot-be-reused-until-after-the-next-backup-log-operation.aspx" /><id>http://blogs.msdn.com/nikhiln/archive/2009/01/19/commerce-server-2007-staging-error-catalogimport-failed-fulltextcatalog-cannot-be-reused-until-after-the-next-backup-log-operation.aspx</id><published>2009-01-19T06:46:47Z</published><updated>2009-01-19T06:46:47Z</updated><content type="html">In one of the production commerce server instances of my client, I suddenly found this error getting logged since a couple of days. Now, the text of the error has nothing to do with Commerce Server 2007 but everything to do with the Sql Server 2005 that forms of the datastore of the commerce server. The full error would look like this: Event Type: Error Event Source: Commerce Server Staging Event Category: None Event ID: 61993 Date: 10/10/2008 Time: 7:42:13 PM User: N/A Computer: PRODUCT-WEB1 Description:...(&lt;a href="http://blogs.msdn.com/nikhiln/archive/2009/01/19/commerce-server-2007-staging-error-catalogimport-failed-fulltextcatalog-cannot-be-reused-until-after-the-next-backup-log-operation.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9339342" width="1" height="1"&gt;</content><author><name>nikhiln</name><uri>http://blogs.msdn.com/members/nikhiln.aspx</uri></author><category term="Commerce Server 2007" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Commerce+Server+2007/default.aspx" /><category term="Catalog System" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Catalog+System/default.aspx" /></entry><entry><title>Commerce Server 2007 Staging Error : "Error occurred with the database StagingLog.mdb"</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nikhiln/archive/2008/11/13/commerce-server-2007-staging-error-error-occurred-with-the-database-staginglog-mdb.aspx" /><id>http://blogs.msdn.com/nikhiln/archive/2008/11/13/commerce-server-2007-staging-error-error-occurred-with-the-database-staginglog-mdb.aspx</id><published>2008-11-13T13:27:43Z</published><updated>2008-11-13T13:27:43Z</updated><content type="html">Yesterday I came across a very strange Commerce Server Staging error at one of the production boxes of the customer am working for. Strangely, for some reason, the Staging server stopped and started to throw out the below error: &amp;#160; Event Type:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Error Event Source:&amp;#160;&amp;#160;&amp;#160; Commerce Server Staging Event Category:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; None Event ID:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;...(&lt;a href="http://blogs.msdn.com/nikhiln/archive/2008/11/13/commerce-server-2007-staging-error-error-occurred-with-the-database-staginglog-mdb.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9065882" width="1" height="1"&gt;</content><author><name>nikhiln</name><uri>http://blogs.msdn.com/members/nikhiln.aspx</uri></author><category term="Commerce Server 2007" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Commerce+Server+2007/default.aspx" /></entry><entry><title>Using HttpModules to perform a SSL switch on web pages</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nikhiln/archive/2008/09/05/using-httpmodules-to-perform-a-ssl-switch-on-web-pages.aspx" /><id>http://blogs.msdn.com/nikhiln/archive/2008/09/05/using-httpmodules-to-perform-a-ssl-switch-on-web-pages.aspx</id><published>2008-09-05T11:56:36Z</published><updated>2008-09-05T11:56:36Z</updated><content type="html">A common requirement of any secure website is to make sure that when a user traverses to a &amp;quot;sensitive&amp;quot; part of the website such the login page, the password reset page or even the personal profile page which might contain contact detail you would want the user to be forced onto a HTTPS secured page. On the other hand, you might also want the user to be forced off the Secure protocol for general view pages so that the network bottleneck is eliminated at the server end due to unwanted overuse...(&lt;a href="http://blogs.msdn.com/nikhiln/archive/2008/09/05/using-httpmodules-to-perform-a-ssl-switch-on-web-pages.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8926095" width="1" height="1"&gt;</content><author><name>nikhiln</name><uri>http://blogs.msdn.com/members/nikhiln.aspx</uri></author><category term="Web Application" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Web+Application/default.aspx" /><category term="ASP.NET 2.0" scheme="http://blogs.msdn.com/nikhiln/archive/tags/ASP.NET+2.0/default.aspx" /><category term="C#" scheme="http://blogs.msdn.com/nikhiln/archive/tags/C_2300_/default.aspx" /><category term="HttpModule" scheme="http://blogs.msdn.com/nikhiln/archive/tags/HttpModule/default.aspx" /></entry><entry><title>Commerce Server 2007: Accessing multi-valued custom properties in UserObject of Profile System</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nikhiln/archive/2008/09/04/commerce-server-2007-accessing-multi-valued-custom-properties-in-userobject-of-profile-system.aspx" /><id>http://blogs.msdn.com/nikhiln/archive/2008/09/04/commerce-server-2007-accessing-multi-valued-custom-properties-in-userobject-of-profile-system.aspx</id><published>2008-09-04T15:34:46Z</published><updated>2008-09-04T15:34:46Z</updated><content type="html">The MSDN's Managing Profiles section of the commerce server gives an in-depth view of the working of the profile system and the steps needed to create custom properties for the UserObject. The Extending the Profile System section gives out detailed steps to extend the profile system. A frequently searched topic is to create, save and access Multi-Valued properties for the UserObject in the profile system. 1. Create Multi-valued profile properties This is a straightforward profile editing activity...(&lt;a href="http://blogs.msdn.com/nikhiln/archive/2008/09/04/commerce-server-2007-accessing-multi-valued-custom-properties-in-userobject-of-profile-system.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8924339" width="1" height="1"&gt;</content><author><name>nikhiln</name><uri>http://blogs.msdn.com/members/nikhiln.aspx</uri></author><category term="Commerce Server 2007" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Commerce+Server+2007/default.aspx" /><category term="Profile System" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Profile+System/default.aspx" /></entry><entry><title>EntLib 3.1 DAAB: Be careful with the ExecuteReader</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nikhiln/archive/2008/07/08/entlib-3-1-daab-be-careful-with-the-executereader.aspx" /><id>http://blogs.msdn.com/nikhiln/archive/2008/07/08/entlib-3-1-daab-be-careful-with-the-executereader.aspx</id><published>2008-07-08T09:40:59Z</published><updated>2008-07-08T09:40:59Z</updated><content type="html">The EntLib 3.1 is simply superb, right?! Well, I would give a typical consultant answer... "It depends!". It depends on the developers who are using it and it depends on motivation of the developers to know the component before "copy-pasting" code and method calls. Case in point is the exceptionally well written Data Access Application Block (a.k.a. DAAB). My team is involved in developing an e-commerce web site for a large automotive retailer and is using this DAAB beauty to ease the development...(&lt;a href="http://blogs.msdn.com/nikhiln/archive/2008/07/08/entlib-3-1-daab-be-careful-with-the-executereader.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8706852" width="1" height="1"&gt;</content><author><name>nikhiln</name><uri>http://blogs.msdn.com/members/nikhiln.aspx</uri></author><category term="C#" scheme="http://blogs.msdn.com/nikhiln/archive/tags/C_2300_/default.aspx" /><category term=".NET 2.0" scheme="http://blogs.msdn.com/nikhiln/archive/tags/.NET+2.0/default.aspx" /><category term="EntLib" scheme="http://blogs.msdn.com/nikhiln/archive/tags/EntLib/default.aspx" /></entry><entry><title>Commerce Server 2007: Catalog Import Error for Large Files</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nikhiln/archive/2008/06/16/commerce-server-2007-catalog-import-error-for-large-files.aspx" /><id>http://blogs.msdn.com/nikhiln/archive/2008/06/16/commerce-server-2007-catalog-import-error-for-large-files.aspx</id><published>2008-06-16T14:51:56Z</published><updated>2008-06-16T14:51:56Z</updated><content type="html">When you are trying to import a large catalog into the commerce server catalog system you might come across this error: The import failed because the import file is larger than the maximum size allowed on your server.&amp;#160; Contact your system administrator. The solution for this to open up the web.config of CatalogWebService and then increase the size limit of uploads to more than the file that you intend to upload. The current default value is 200MB. The steps to increase the size are: Traverse...(&lt;a href="http://blogs.msdn.com/nikhiln/archive/2008/06/16/commerce-server-2007-catalog-import-error-for-large-files.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8604677" width="1" height="1"&gt;</content><author><name>nikhiln</name><uri>http://blogs.msdn.com/members/nikhiln.aspx</uri></author><category term="Web Services" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Web+Services/default.aspx" /><category term="Commerce Server 2007" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Commerce+Server+2007/default.aspx" /><category term="Catalog System" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Catalog+System/default.aspx" /></entry><entry><title>HttpHandler to Authorize File Downloads - C# Code Sample</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nikhiln/archive/2008/05/22/httphandler-to-authorize-file-downloads-c-code-sample.aspx" /><id>http://blogs.msdn.com/nikhiln/archive/2008/05/22/httphandler-to-authorize-file-downloads-c-code-sample.aspx</id><published>2008-05-22T07:31:11Z</published><updated>2008-05-22T07:31:11Z</updated><content type="html">Its quite a common scenario to have a feature in a web site to check for the credentials of the user before allowing a particular download. For example, there might be some documents which should be visible only to a set of users and not to any others. This document might be anything - a PDF file, a zip file, an exe, a .doc,etc. The situation gets even more complicated when you have certain documents that can be downloaded by everyone on the Internet and have some documents visible only to logged...(&lt;a href="http://blogs.msdn.com/nikhiln/archive/2008/05/22/httphandler-to-authorize-file-downloads-c-code-sample.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8531246" width="1" height="1"&gt;</content><author><name>nikhiln</name><uri>http://blogs.msdn.com/members/nikhiln.aspx</uri></author><category term="Web Application" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Web+Application/default.aspx" /><category term="ASP.NET 2.0" scheme="http://blogs.msdn.com/nikhiln/archive/tags/ASP.NET+2.0/default.aspx" /><category term="C#" scheme="http://blogs.msdn.com/nikhiln/archive/tags/C_2300_/default.aspx" /><category term="HttpHandler" scheme="http://blogs.msdn.com/nikhiln/archive/tags/HttpHandler/default.aspx" /></entry><entry><title>.NET 2.0 Symmetric Encryption Code Sample</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nikhiln/archive/2008/05/18/net-2-0-symmetric-encryption-code-sample.aspx" /><id>http://blogs.msdn.com/nikhiln/archive/2008/05/18/net-2-0-symmetric-encryption-code-sample.aspx</id><published>2008-05-18T18:53:00Z</published><updated>2008-05-18T18:53:00Z</updated><content type="html">One of the most common problems when developing any web site if the need to use Symmetric Encryption to save some data in the Cookie so that it can be looped back to the user's session / identity. .NET provides a very robust mechanism in which this can be achieved and supports the most well-known of both, Symmetric and Asymmetric encryption algorithms. This MSDN article does a phenomenal job of explaining the nittie-gritties of the various algorithms available and the different scenarios in which...(&lt;a href="http://blogs.msdn.com/nikhiln/archive/2008/05/18/net-2-0-symmetric-encryption-code-sample.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8518240" width="1" height="1"&gt;</content><author><name>nikhiln</name><uri>http://blogs.msdn.com/members/nikhiln.aspx</uri></author><category term="C#" scheme="http://blogs.msdn.com/nikhiln/archive/tags/C_2300_/default.aspx" /><category term="Cryptography" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Cryptography/default.aspx" /><category term=".NET 2.0" scheme="http://blogs.msdn.com/nikhiln/archive/tags/.NET+2.0/default.aspx" /></entry><entry><title>Commerce Server 2007 Code Samples - Catalog System and Basic Catalog Search</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nikhiln/archive/2008/04/14/commerce-server-2007-code-samples-catalog-system-and-basic-catalog-search.aspx" /><id>http://blogs.msdn.com/nikhiln/archive/2008/04/14/commerce-server-2007-code-samples-catalog-system-and-basic-catalog-search.aspx</id><published>2008-04-14T08:55:00Z</published><updated>2008-04-14T08:55:00Z</updated><content type="html">I did some qualitative analysis of the referrals of my blog, and found that a majority of the search terms are for Commerce Server Code Samples or for Commerce Server API usage samples.Though some very good code samples are available at the Microsoft Commerce Server Product Unit blog , it is extremely difficult to get hold of them as they have been filed either under Webcasts as attachments or in the context of a different article. I will try to get hold of some genuine code samples that are spread...(&lt;a href="http://blogs.msdn.com/nikhiln/archive/2008/04/14/commerce-server-2007-code-samples-catalog-system-and-basic-catalog-search.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8386402" width="1" height="1"&gt;</content><author><name>nikhiln</name><uri>http://blogs.msdn.com/members/nikhiln.aspx</uri></author><category term="Commerce Server 2007" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Commerce+Server+2007/default.aspx" /><category term="Catalog System" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Catalog+System/default.aspx" /></entry><entry><title>Multi-Threaded Web Service Calls - A C# Code Sample</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nikhiln/archive/2008/04/12/multi-threaded-web-service-calls-a-c-code-sample.aspx" /><id>http://blogs.msdn.com/nikhiln/archive/2008/04/12/multi-threaded-web-service-calls-a-c-code-sample.aspx</id><published>2008-04-12T18:51:33Z</published><updated>2008-04-12T18:51:33Z</updated><content type="html">Sometimes it becomes necessary to call an external web service in a multi threaded manner to speed up processing of records that we have in a buffer so that the overall time spent in waiting for the calls to return is reduced. The high-level steps to perform are: Though we can have a long philosophical discussion as to which design to use, my intention here is to demonstrate and give some code sample as to how to achieve this. Some of the assumption for this are: All the records which contain the...(&lt;a href="http://blogs.msdn.com/nikhiln/archive/2008/04/12/multi-threaded-web-service-calls-a-c-code-sample.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8385439" width="1" height="1"&gt;</content><author><name>nikhiln</name><uri>http://blogs.msdn.com/members/nikhiln.aspx</uri></author><category term="Web Services" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Web+Services/default.aspx" /><category term="Threads" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Threads/default.aspx" /><category term="C#" scheme="http://blogs.msdn.com/nikhiln/archive/tags/C_2300_/default.aspx" /></entry><entry><title>Commerce Server 2007 SetJoin API</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nikhiln/archive/2008/04/02/commerce-server-2007-setjoin-api.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="10573" href="http://blogs.msdn.com/nikhiln/attachment/8349739.ashx" /><id>http://blogs.msdn.com/nikhiln/archive/2008/04/02/commerce-server-2007-setjoin-api.aspx</id><published>2008-04-02T06:45:00Z</published><updated>2008-04-02T06:45:00Z</updated><content type="html">The official documentation for the commendable SetJoin API in commerce Server 2007 seems more like a class reference without any code samples or introductory material into the way SetJoin should be used. So here's the "low-down" as to how a SetJoin API needs to be developed. A fully tested and working version of the C# code project file is attached with this post! Problem : While developing a commerce web site, you come across a situation in which there is some data that needs to be pulled in, say...(&lt;a href="http://blogs.msdn.com/nikhiln/archive/2008/04/02/commerce-server-2007-setjoin-api.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8349739" width="1" height="1"&gt;</content><author><name>nikhiln</name><uri>http://blogs.msdn.com/members/nikhiln.aspx</uri></author><category term="Commerce Server 2007" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Commerce+Server+2007/default.aspx" /></entry><entry><title>Commerce Server 2007 Web Services Application Pool Invalid Identity Error</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nikhiln/archive/2007/12/03/commerce-server-2007-web-services-application-pool-invalid-identity-error.aspx" /><id>http://blogs.msdn.com/nikhiln/archive/2007/12/03/commerce-server-2007-web-services-application-pool-invalid-identity-error.aspx</id><published>2007-12-03T10:03:00Z</published><updated>2007-12-03T10:03:00Z</updated><content type="html">When you are configuring a clean install of Commerce Server 2007, you'll definitely need to go through the hellish and longish configuration steps that this document specifies. But once in a blue moon you might get this Application Pool Invalid Identity error when you are trying to browse the Web Services of Commerce Server (Order, Catalog, Marketing and Profiles). The error will be very cryptic with something on the lines: "The identity specified for the Application Pools is invalid... the application...(&lt;a href="http://blogs.msdn.com/nikhiln/archive/2007/12/03/commerce-server-2007-web-services-application-pool-invalid-identity-error.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6644992" width="1" height="1"&gt;</content><author><name>nikhiln</name><uri>http://blogs.msdn.com/members/nikhiln.aspx</uri></author><category term="Commerce Server 2007" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Commerce+Server+2007/default.aspx" /></entry><entry><title>Passing property values in Remove action using UAB for MSIs</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nikhiln/archive/2007/06/27/passing-property-values-in-remove-action-using-uab-for-msis.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="3727" href="http://blogs.msdn.com/nikhiln/attachment/3565330.ashx" /><id>http://blogs.msdn.com/nikhiln/archive/2007/06/27/passing-property-values-in-remove-action-using-uab-for-msis.aspx</id><published>2007-06-27T16:03:00Z</published><updated>2007-06-27T16:03:00Z</updated><content type="html">&lt;P&gt;&lt;STRONG&gt;Problem:&lt;/STRONG&gt; An application which you are developing is using UAB (&lt;A class="" title="Updater Application Block" href="http://msdn2.microsoft.com/en-us/library/ms978574.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms978574.aspx"&gt;Updater Application Block&lt;/A&gt;)&amp;nbsp;to pull in updates from a server. There is a requirement to uninstall the application using UAB with the help of an MSI, but the uninstall needs to happen conditionally so that, based on the value of a property, parts of the uninstall steps are skipped. The issue now is that the infrastructure that the UAB provides does not allow us to pass property-value pairs using the MsiProcessor to invoke the msi uninstall action AND pass some property=value pairs.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Solution&lt;/STRONG&gt;: The usual way in which a manifest is authored for a msi processor to use the Remove action will be something like:&lt;/P&gt;
&lt;HR height="1"&gt;
&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;&lt;BR&gt;&amp;lt;manifest manifestId="{311085F7-9320-4318-9A67-9BE32F04E933}" mandatory="True"&lt;BR&gt;&amp;nbsp;xmlns="urn:schemas-microsoft-com:PAG:updater-application-block:v2:manifest"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;description&amp;gt;TestUAB Manifest&amp;lt;/description&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;application applicationId="{215E1AD7-9ABA-432f-A952-24BABA556850}"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;entryPoint file="" parameters="" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;location&amp;gt;.\..\..&amp;lt;/location&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/application&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;activation&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tasks&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;task name="MSIProcessorInstall" type="Microsoft.ApplicationBlocks.Updater.ActivationProcessors.MsiProcessor, Microsoft.ApplicationBlocks.Updater.ActivationProcessors" taskId="{425E1AD7-9ABA-432f-A952-24BABA556850}"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;config&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;installType&amp;gt;Remove&amp;lt;/installType&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;productCode&amp;gt;{F7924949-7D0A-47E5-B133-AD2CC5C081F4}&amp;lt;/productCode&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;uiLevel&amp;gt;msiUILevelDefault&amp;lt;/uiLevel&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/config&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/task&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tasks&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/activation&amp;gt;&lt;BR&gt;&amp;lt;/manifest&amp;gt; 
&lt;HR height="1"&gt;

&lt;P&gt;The one glaring&amp;nbsp;mess-up (uhum... miss-up) is that unlike the Install action, there is no provision to pass propertyValues to the Remove action! There are two things that need to be done for the UAB MSI uninstall or rather the remove action to recognize the various property values being passed.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Modify the MsiProcessor.cs&lt;/STRONG&gt; found in Microsoft.ApplicationBlocks.Updater.ActivationProcessors (aka ActivationProcessors project)&lt;BR&gt;Modify the RemoveProduct(...) to include the follow bits of code&lt;BR&gt;&lt;FONT size=2&gt;
&lt;P&gt;...&lt;BR&gt;session = installer.OpenProduct( productCode );&lt;BR&gt;&lt;/FONT&gt;&lt;EM&gt;&lt;FONT size=2&gt;propertyValuePairs = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.GetPropertValuePairs(propertyValues);&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;for&lt;/FONT&gt;&lt;FONT size=2&gt; (&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;FONT size=2&gt; i = 0; i &amp;lt; propertyValuePairs.Length; i++)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt;[] parts = propertyValuePairs[i].Split(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;'='&lt;/FONT&gt;&lt;/EM&gt;&lt;FONT size=2&gt;&lt;EM&gt;);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;EM&gt;session.set_Property(parts[0], parts[1]);&lt;BR&gt;}&lt;BR&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;session.DoAction( &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"INSTALL"&lt;/FONT&gt;&lt;FONT size=2&gt; );&lt;BR&gt;...&lt;BR&gt;&lt;BR&gt;And, in the same class put in the definition for parsing the property values&lt;BR&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt;[] GetPropertValuePairs(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt; propertyValues)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt;[] propertyValuePairs = propertyValues.Split(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;' '&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;FONT size=2&gt; propertyValuePairs;&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;&lt;EM&gt;&lt;STRONG&gt;If this doesn't make much sense the full code is attached along&amp;nbsp;this post!&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Modify the Manifest&lt;/STRONG&gt; to include the propertyValues tag&lt;BR&gt;Once the MsiProcessor is modified, we need to tag a tag to the manifest so that we will be able to pass on the property to the msiexec.exe process which actually hadles all requests for MSI actions. (Again, refer the RemoveManifest.xml attached in this mail)&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;That's all folks... you are up and running.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3565330" width="1" height="1"&gt;</content><author><name>nikhiln</name><uri>http://blogs.msdn.com/members/nikhiln.aspx</uri></author><category term="Setup and Deployment" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Setup+and+Deployment/default.aspx" /><category term="MSI" scheme="http://blogs.msdn.com/nikhiln/archive/tags/MSI/default.aspx" /><category term="UAB" scheme="http://blogs.msdn.com/nikhiln/archive/tags/UAB/default.aspx" /></entry><entry><title>Detecting Session Timeout in ASP.NET 2.0 Web Applications</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nikhiln/archive/2007/06/21/detecting-session-timeout-in-asp-net-2-0-web-applications.aspx" /><id>http://blogs.msdn.com/nikhiln/archive/2007/06/21/detecting-session-timeout-in-asp-net-2-0-web-applications.aspx</id><published>2007-06-21T16:40:00Z</published><updated>2007-06-21T16:40:00Z</updated><content type="html">&lt;P&gt;&lt;STRONG&gt;Problem:&lt;/STRONG&gt; An ASP.NET 2.0 web application needs to detect a session timeout condition so that the user can be redirected to a different page and / or an error message is displayed.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Solution:&lt;/STRONG&gt; There are three ways of approaching this problem, starting off with the simplest one to the most complicated one. So, here it goes:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Using Session["xxx"] value to determine the session timeout:&lt;/STRONG&gt; This is a &lt;EM&gt;"quick and dirty"&lt;/EM&gt; hack that can be introduced into an application to figure out whether a timeout has occured. We need to do two things here. &lt;BR&gt;&lt;EM&gt;First, in Global.asax, create your own GUID and put it in the session object,&lt;/EM&gt;&lt;BR&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; void&lt;/FONT&gt;&lt;FONT size=2&gt; Session_Start(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;object&lt;/FONT&gt;&lt;FONT size=2&gt; sender, &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;EventArgs&lt;/FONT&gt;&lt;FONT size=2&gt; e) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Code that runs when a new session is started&lt;BR&gt;&lt;/FONT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Session["CustomSessionId"] = &lt;FONT color=#2b91af size=2&gt;Guid&lt;/FONT&gt;&lt;FONT size=2&gt;.NewGuid();&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&lt;EM&gt;&lt;BR&gt;Second&lt;/EM&gt;, BasePage.cs which would have inherited Page, in PageLoad() event, check whether the Session["CustomSessionId"] == null, if it&amp;nbsp;IS null, it means that the session was timed-out and AspNet runtime cleared it out.&lt;FONT size=2&gt;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&lt;/FONT&gt;&lt;FONT size=2&gt;( Session[&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"CustomSessionId"&lt;/FONT&gt;&lt;FONT size=2&gt;] == &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;null&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Redirect(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"TimeoutPage.htm"&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Using a combination of Session.IsNewSession and Request.Cookies collection:&lt;/STRONG&gt; Leveraging the behavior of ASP.NET runtime, we can check whether the Session.IsNewSession flag is true, if its true and we find that &lt;FONT size=2&gt;Request.Cookies[&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"ASP.NET_SessionId"&lt;/FONT&gt;&lt;FONT size=2&gt;] has a valid value, it means that a timeout occured and a new request was generated by the runtime. This code fragment can be inserted into the OnInit(...) method in the BasePage class so that it applies across the application.&lt;BR&gt;&lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;
&lt;P&gt;protected&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;override&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; OnInit(&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;EventArgs&lt;/FONT&gt;&lt;FONT size=2&gt; e)&lt;BR&gt;{&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; base&lt;/FONT&gt;&lt;FONT size=2&gt;.OnInit(e);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (Context.Session != &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;null&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//check whether a new session was generated&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&lt;/FONT&gt;&lt;FONT size=2&gt; (Session.IsNewSession)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//check whether a cookies had already been associated with this request&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;HttpCookie&lt;/FONT&gt;&lt;FONT size=2&gt; sessionCookie = Request.Cookies[&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"ASP.NET_SessionId"&lt;/FONT&gt;&lt;FONT size=2&gt;];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (sessionCookie != &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;null&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt; sessionValue = sessionCookie.Value;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (!&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt;.IsNullOrEmpty(sessionValue))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#008000 size=2&gt;// we have session timeout condition!&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// Response.Redirect("SessionTimeout.htm");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT size=2&gt;Session[&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"IsSessionTimeOut"&lt;/FONT&gt;&lt;FONT size=2&gt;] = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;&lt;FONT color=red&gt;&lt;EM&gt;&lt;STRONG&gt;WARNING&lt;/STRONG&gt;:- We will have to wireup the&amp;nbsp;"&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; Session_Start(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;object&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; sender, &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;EventArgs&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; e)&lt;/FONT&gt;&lt;/FONT&gt;" method in the Global.asax to use the Session.IsNewSession meaningfully. ASP.NET 2.0 runtime is a bit weird in the sense that it will always return the value of Session.IsNewSession as true in case the Event is not wireup!&lt;/EM&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;Using HTTP Module:&lt;/STRONG&gt; Arguably the most complex but robust way to tackle this situation. I would rather not go into this as this carries the risk of opening security holes in the HTTP stream&lt;/P&gt;&lt;/LI&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/OL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3443782" width="1" height="1"&gt;</content><author><name>nikhiln</name><uri>http://blogs.msdn.com/members/nikhiln.aspx</uri></author><category term="Web Application" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Web+Application/default.aspx" /><category term="Session" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Session/default.aspx" /><category term="ASP.NET 2.0" scheme="http://blogs.msdn.com/nikhiln/archive/tags/ASP.NET+2.0/default.aspx" /></entry><entry><title>Creating the Other People (aka AddressBook) Certificate Store through Registry</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nikhiln/archive/2007/05/04/creating-the-other-people-aka-addressbook-certificate-store-through-registry.aspx" /><id>http://blogs.msdn.com/nikhiln/archive/2007/05/04/creating-the-other-people-aka-addressbook-certificate-store-through-registry.aspx</id><published>2007-05-04T15:41:00Z</published><updated>2007-05-04T15:41:00Z</updated><content type="html">&lt;P&gt;&lt;STRONG&gt;Problem:&lt;/STRONG&gt; A common scenario while installing application which consume certificates from the Other People store (or AddressBook in registry terms) is the failure of CertMgr.exe on a clean machine which doesn't have any other certificates. Now the problem will be, for a clean machine which doesn't already have the Other People store,&amp;nbsp;when we are trying to install the certificate using CertMgr.exe it would fails with an error stating that the store specified is not found! The typical solution listed will be &lt;EM&gt;"Open Internet Explorer | Internet Options, flip to the Content tab and press the Certificates button. Click the Other People tab and press the Import button to continue". &lt;/EM&gt;But in case of an automated installation, this obviously is not the answer!&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Solution:&lt;/STRONG&gt; Using .NET registry API or if you are authoring the setup in WiX, through the Regitry action, create the following key in registry which should then allow you to execute CertMgr.exe to import the certificate at the AddressBook store.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SystemCertificates\AddressBook&lt;/EM&gt; &lt;/P&gt;
&lt;P&gt;This will create the Other People store which will be visible in MMC Certificates Snap-in. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2409679" width="1" height="1"&gt;</content><author><name>nikhiln</name><uri>http://blogs.msdn.com/members/nikhiln.aspx</uri></author><category term="Setup and Deployment" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Setup+and+Deployment/default.aspx" /><category term="CertMgr" scheme="http://blogs.msdn.com/nikhiln/archive/tags/CertMgr/default.aspx" /><category term="Certificates" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Certificates/default.aspx" /><category term="Registry" scheme="http://blogs.msdn.com/nikhiln/archive/tags/Registry/default.aspx" /></entry></feed>