Welcome to Atlanta .NET Regular Guys Sign in | Join | Help

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

Published 24-08-2005 07:06 by Matt Ranlett
Filed Under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

What do you think?

(required) 
(optional)
(required) 

About Matt Ranlett

One of the two original Atlanta .NET Regular Guys, Matt fills his free time by helping to run several Atlanta area user groups, the Atlanta Code Camps, and works as one of the two INETA co-Vice Presidents of Technology
SkinName:iroha_Blog2
Powered by Community Server, by Telligent Systems