How to enable an ASP.Net application to run on a SharePoint virtual server
Form: http://support.microsoft.com/?id=828810
SUMMARY
This article describes how to configure an ASP.NET application to run on a virtual server that is running Microsoft Windows SharePoint Services or Microsoft Office SharePoint Portal Server 2003.
MORE INFORMATION
To enable an ASP.NET application to run on a server that is running Windows SharePoint Services or SharePoint Portal Server 2003, configure an exclusion for the application path on the virtual server. The exclusion tells the server that is running SharePoint Portal Server 2003 not to intercept the request to access the virtual server and to let the Microsoft Internet Information Services (IIS) server to handle the request.
Note In Office SharePoint Server 2007, you do not have to configure an exclusion. However, you should create a virtual directory by using Internet Information Services Manager. Additionally, you should configure the virtual directory as an application. The application should have a corresponding Web.config file.
To create an exclusion for a part of the URL namespace of the virtual server, follow these steps:
Sometimes, you have to do more than just set the Excluded path. Some Web programs require that you modify the Web.config file for the server that is running Windows SharePoint Services or SharePoint Portal Server 2003. To modify the Web.config file, follow these steps:
Note If you do not create the exclusion for the virtual server, Windows SharePoint Services or SharePoint Portal Server 2003 will return one of the following error messages when you try to visit any one of the pages that is located on the file system:
Add the following directives in the Web.config file of the Web application between the <system.web> tag and the </system.web> tag:
Note In Office SharePoint Server 2007, you do not have to configure an exclusion. However, you should create a virtual directory by using Internet Information Services Manager. Additionally, you should configure the virtual directory as an application. The application should have a corresponding Web.config file.
To create an exclusion for a part of the URL namespace of the virtual server, follow these steps:
1. | Click Start, click Administrative Tools, and then click SharePoint Central Administration. |
2. | In the Virtual Server Configuration area, click Configure virtual server settings. |
3. | On the Virtual Server List tab, click the virtual server that you have to add the excluded paths to. |
4. | Under Virtual Server Management, click Define Managed Paths. |
5. | In the Add a New Path section, type the path that you want to exclude in the Path box. |
6. | Click Excluded Path, and then click OK. |
1. | On the server that is hosting the Web page that you want to configure, locate the path that was excluded from the steps that are earlier in this article. The path will be similar to the following:
drive:\inetpub\wwwroot\Excluded Path
|
||||||
2. | Save a backup copy of the Web.config file as Web2.config. | ||||||
3. | Open the Web.config file. | ||||||
4. | Locate the <system.web> tag, and then add the following code under the tag:
|
||||||
5. | Save the Web.config file. For additional information about how to create a Web.config file to use with ASP.NET, click the following article number to view the article in the Microsoft Knowledge Base: 815179 (http://support.microsoft.com/kb/815179/) How to create the Web.config file for an ASP.NET application
|
||||||
6. | Install the HTTP module that is discussed in Microsoft Knowledge Base article 887289 to look for canonicalization issues with ASP.NET. After you install the module, add the module reference to your Web.config file for your ASP.NET application that resides under an excluded path of the SharePoint Portal Server 2003 virtual server. Note The module does not have to be added to the Web.config file that SharePoint Portal Server 2003 uses at the root of the virtual server. To add the module reference to your ASP.NET application's Web.config file, follow these steps:
887289 (http://support.microsoft.com/kb/887289/) HTTP module to check for canonicalization issues with ASP.NET
887459 (http://support.microsoft.com/kb/887459/) How to programmatically test for canonicalization issues with ASP.NET
|
The page cannot be found
HTTP 404 - File not found
HTTP 404 - File not found
Error
A Web Part on this Smartpage cannot be displayed because it is not registered on this site as a safe Web Part.
Troubleshoot issues with Microsoft SharePoint.
Note This problem occurs because all requests to access the virtual server are intercepted by Windows SharePoint Services or by SharePoint Portal Server 2003.A Web Part on this Smartpage cannot be displayed because it is not registered on this site as a safe Web Part.
Troubleshoot issues with Microsoft SharePoint.
Add the following directives in the Web.config file of the Web application between the <system.web> tag and the </system.web> tag:
<!--
Clear out the WSS ASP.NET handler and specify the default ASP.NET handler for all pages.
-->
<httpHandlers>
<clear />
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory, System.Web,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</httpHandlers>
<!--
Set the trust to Full. WSS configures a very restrictive trust policy that does not
allow ASP.NET Web application to run correctly.
-->
<trust level="Full" originUrl="" />
<!--
Enable the session module. This can also be enabled on the WSS Web.config,
but is not enabled by default. If you receive the following message:
Parser Error Message: The module 'Session' is already in the application
and cannot be added again. You can remove the following
<httpModules></httpModules> section as session is already enabled
on the virtual server.
-->
<httpModules>
<add name="Session" type="System.Web.SessionState.SessionStateModule"/>
</httpModules>
<!-- Enable session state for all the pages in the Web application. -->
<pages enableSessionState="true" enableViewState="true"
enableViewStateMac="true" validateRequest="false" />