Tuesday, April 21, 2009

Using App_Offline feature when updating your web site

Hi Guys,
Here's the convenient way to bring down an ASP.NET web site while we update it. Just create an App_Offline.htm file and place it to the root directory of the web site. Whenever the ASP.NET engine finds this file in the root directory, it will render App_Offline.htm for any request that is directed towards the web site.

Here is the sample listing for App_Offline.htm:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html
xmlns="http://www.w3.org/1999/xhtml" >

<head>
<title>Site Under Construction</title>
</head>
<body>
<h1>Under
Construction</h1>

<h2>This site will be up
again from 9:00 pm...We regret for
the inconvinience</h2>
<!--
Adding additional hidden content so that IE Friendly Errors
don't
prevent
this message from displaying (note: it will show a
"friendly" 404
error if the content isn't of a certain size. Best if the
size is
>= 512 bytes. Thanking scott for pointing this workaround
tip).
<span>We regret for the inconvinience. We regret for the
inconvinience.
We regret for the inconvinience. We regret for the
inconvinience. We regret for
the inconvinience. We regret for the
inconvinience. We regret for the inconvinience.
We regret for the
inconvinience. We regret for the inconvinience. We regret for
the
inconvinience. We regret for the inconvinience. We regret for the inconvinience.
We regret for the inconvinience. We regret for the inconvinience. We regret
for
the inconvinience. We regret for the inconvinience. We regret for the
inconvinience.
We regret for the inconvinience. </span>
-->
</body>
</html>
That's it.

Monday, March 23, 2009

Unrecognized tag prefix or device filter 'asp'

The solution to this error can be found here.
The short version – if you’re using (nested) master pages and you’re seeing all of your tags underlined and complaining with “Unrecognized tag prefix or device filter ‘asp’.”, the solution is to keep your (nested) master page open in Visual Studio. That’s right – it sounds ugly – but that’s the fix.
So, if you have a Page that references a master page called ChildMaster.master which references ParentMaster.master, you should open ChildMaster.master (even if you don’t plan to make any changes to it) and leave it open in the VS IDE while you work on pages that refer to it.
Hopefully this will be fixed in the upcoming update.

Tuesday, March 17, 2009

How to Optimize Scalability for ASP.NET Web Applications

Web applications based on Microsoft ASP.NET technology are increasingly being used in high-transaction environments with thousands of users. As a result, these applications are being hosted in Web farms consisting of multiple Web servers with a load balancer.
With this increased load, many applications are experiencing major performance and scalability bottlenecks. Enterprise managers are either already grappling with these issues or are unknowingly on a fast track to crash right into those troubled areas. Scalability means keeping the same performance even during peak usage times or while supporting a higher number of users in general. More...