First the good news, there is a cool new method on the string class, instead of having to do the following...
if(astring != null)
if(astring.Length > 0)
bstring = astring;
There is the new
String.IsNullOrEmpty function that allows you do this...
if(!String.IsNullOrEmpty(astring))
bstring = astring;
OK, it doesn't save a lot of code, but it's a 33% savings and it makes for more readable code. Also it is
faster than using the string == ""
if(astring != null)
if(astring == "")
bstring = astring;
and it won't throw a null execption that would occur on the following if you don't check for a null first.
if(astring.length == 0)
bstring = astring;
Now, for some disturbing news about
app recycling when your web app deletes files or directories. Mike Belcher found this the hard way, his sessions were dying and he didn't know why. He was deleting some files, which worked fine in 1.1, but if you delete too many in 2.0, hello recycling, good-bye sessions. Here's some more
info.
This is some major foo. If you are running some intensive logging or doing lots of file uploading, you can blow up your app info, sessions and cache without having a clue why. The suggested workaround (using junction points) is a little tedious and is also not viable for shared hosting systems.
A better workaround is buried in one of the comments of Scott's blog...The App_Data folder of the web app is NOT monitored by the File Change Notification, so if any part of your web app needs to do lots of file or directory manipulation, do it there to prevent sudden AppDomain recycling.
I'm surprised that this new "feature" didn't bite more people on the ass during the beta period.
In a perfect world, a patch to turn off this behavior will be available soon.