After getting some production errors I mad a small app to try and exaust the ports on my test box.
I was developing a pretty simple today that looped 1000 times getting the page from google, msn, and yahoo.
Everything was working, then I got the infamous "Works on my dev box but not the server."
When trying to open an httpRequest. I got a .NET exception System.Net.WebPermission.
The exact code was:
System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=failed
Turns out I opened a network share from the test machine to my dev machine. I was trying to run the app right from the share.
Applications run from a share run in a different security domain, and it did not have permission to open the connection.
I moved the app to the local machine and everything worked out fine.