Posts

Showing posts from November, 2006

What is the maximum size of a ASP.NET session object?

Patrick Y. Ng who compiled the informative Session State FAQ has an answer for this somewhat hypothetical question in a newsgroup posting - InProc mode: limit = virtual memory limit StateServer mode: limit = virtual memory limit of the machine which runs state server SQLServer mode: limit = diskspace on SQL server. On a related note, this Case Study on lost session variables and appdomain recycles , makes for insightful reading.

HOW TO stop any ASP.NET (2.0) processing for a website

A typical case when we need to disable ASP.NET processing is when we have a maintenance activity & visitors to the website should see a notification message no matter which page they try to access. I learnt about using "app_offline.htm", a new feature in ASP.NET 2.0 to stop any ASP.NET processing for a website without involving IIS from Fritz Onion 's Essential ASP.NET Webcast series ( Part X ). The trick is to place a file named app_offline.htm in the root directory with a message like "Site down for maintenance". To re-enable the app, the file can be removed or Exclude d from Project . This technique has a quirk. If you use the app_offline.htm feature, you should make sure you have at least 512 bytes of content within it to make sure that your HTML (instead of IE's friendly status message) shows up to your users.

HOW TO suppress the popout arrow on the menu while using ASP.NET 2.0 Menu control

"The PopOut arrowhead can be suppressed on the static menu by coding StaticEnableDefaultPopOutImage="False" (or DynamicEnableDefaultPopOutImage="False" for a submenu), or the arrowhead can be replaced with a graphic image by coding StaticPopOutImageUrl (or DynamicPopOutImageUrl for a submenu) and providing a URL to the image." One a related note, if you run into the case where you find that while mousing over a menu item the menu is mangled in IE but works fine in Firefox, be aware that one convenient way to workaround the problem is to remove the <xhtmlConformance mode="Legacy" /> tag in web.config .