Want an easy way to manage your excluded paths with SharePoint?
When you install SharePoint on a web box, it takes over all of the virtual directories in IIS. This isn't a problem unless you want to run a traditional ASP.Net application on the same server. When you try to go to an ASP.Net application on this box OUTSIDE of SharePoint, you get an error like this:
Server Error in '/asptest' Application.
--------------------------------------------------------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration
file required to service this request. Please review the specific error
details below and modify your configuration file appropriately.
Parser Error Message: The XML file c:\inetpub\wwwroot\web.config could not be loaded. Access to the path "c:\inetpub\wwwroot\web.config" is denied.
Source File: c:\inetpub\wwwroot\web.config Line: 0
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2300;
ASP.NET Version:1.1.4322.2300
To get around this, you have to tell SharePoint that this path is excluded. What you do is go through the Central Administration...Configure Virtual Server Settings...My Web Site...Define Managed Paths and add your app's URL to the excluded paths list. Do this then try to go to your URL again and Presto! Everything works!
However, this can get annoying when you have lots of applications to exclude. How could you script this same action? Try something like this:
Enter the following in a command prompt in the bin dir
"STSADM.EXE -o addpath -url http://localhost/yourwebapp -type exclusion"
-- Matt Ranlett