Tuesday, November 24, 2009
How to enable an ASP.Net application to run on a SharePoint –2003 virtual server
To enable an ASP.NET application on a server walking on foot from Windows SharePoint Services or SharePoint Portal Server 2003, configure an exclusion for the application path on the virtual server. The exclusion tells the server not walking SharePoint Portal Server 2003 to intercept the request to access the virtual server and allow the information to Microsoft Web Services (IIS) to handle the request.
Note: in Office SharePoint Server 2007, you have to configure an exclusion. However, you must create a virtual directory using Internet Information Services Manager. Additionally, you must configure the virtual directory as an application. The application must 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.
Sometimes you have to do more than establish the route of exclusion. Some Web programs require modify the Web.config file for the server running Windows SharePoint Services or SharePoint Portal Server 2003. To modify the Web.config file, follow these steps:
Important Changes: These changes are the most open and unrestricted. Should be evaluated closely and carefully evaluated before use in a production environment.
1. On the server that hosts the Web page you want to configure, locate the path that was excluded from the steps earlier in this article. The route is 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 the tag, and then add the following code under the label:
<!-- Set the trust back to Full. WSS configures a very restrictive trust policy that does not allow most applications to run correctly. -->
<trust level="Full" originUrl="" />
<!--
Enable the modules that you must have for your program to run.
If you receive the following message:
Parser Error Message: The module '<moduleName>' is already in the program and cannot be added again
You can remove the modules that are mentioned in the error message. The SharePoint web.config already includes the module for OutputCache and WindowsAuthentication so you do not have to add them here.
-->
<httpModules>
<add name="Session" type="System.Web.SessionState.SessionStateModule"/>
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule"/>
<add name="PassportAuthentication" type="System.Web.Security.PassportAuthenticationModule"/>
<add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule"/>
<add name="FileAuthorization" type="System.Web.Security.FileAuthorizationModule"/>
</httpModules>
<!-- Enable Session for the pages -->
<pages enableSessionState="true" enableViewState="true" enableViewStateMac="true" validateRequest="false" />
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:
6. Install the HTTP module that is described in Microsoft Knowledge Base a look for canonicalization issues with ASP.NET. After installing the module, add module reference to the Web.config file for your ASP.NET application that resides under an excluded path of SharePoint Portal Server 2003 virtual server.
Note: the module is to be added to the Web.config file that SharePoint Portal Server 2003 uses the virtual server root.
To add the module reference to your ASP.NET application's Web.config file, follow these steps:
a. Open the Web.config file.
b. Locate the <httpModules> entries inside the <system.web> section that you added in step 4, and then add the following code after the last entry:
<add name="ValidatePathModule" type="Microsoft.Web.ValidatePathModule, Microsoft.Web.ValidatePathModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=eba19824f86fdadd"/>
c. Save the Web.config file.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment