IBM Support

Add existing Microsoft ASP.NET Framework 1.x Web Applications to source control with Rational ClearCase

Question & Answer


Question

How can I add an existing Microsoft® Visual Studio.NET® 2002 or 2003 or 2005 web project (ASP.NET Web Application) using []Framework 1.x[] to source control using IBM® Rational® ClearCase®?

Cause

If you have not yet attempted to add your existing ASP.NET 2002/2003/2005 (Framework 1.x) Web Application to ClearCase source control, follow the procedure below.

Note: The procedure below assumes an ASP.NET (Framework 1.x) project already exists as a Visual Studio.NET project inside a Visual Studio.NET solution and that you are using Internet Information Server 5.0 or later.

  • If you have already added your ASP.NET (Framework 1.x) solution or project to ClearCase source control and you are having problems, review the Troubleshooting Tips at the end of the technote for assistance.


IMPORTANT: If you have already attempted to manually add your existing ASP.NET (Framework 1.x) solution or project to ClearCase source control and you are having problems, review the DISCLAIMER at the end of the technote for instructions.

Add an existing ASP.NET 2005 (Framework 2.x) Project to ClearCase:

If you need to add your existing ASP.NET 2005 (Framework 2.x) project to source control, refer to technote 1256082.

Add a new ASP.NET (Framework 1.x) Project to ClearCase:

If you need to add a new ASP.NET (Framework 1.x) solution or project to source control with ClearCase, refer to technote 1129588.

Add an existing VS.NET Project (Non-ASP.NET) to ClearCase:

If you need to add a VS.NET (non-ASP.NET) project to source control with ClearCase, refer to technote 1129529.

Add a new VS.NET Project to ClearCase.

Follow the instructions in the Online Help.included with ClearCase (Start > Programs > IBM Rational > IBM Rational ClearCase > Online Help > Rational ClearCase integrations with vendor products > Microsoft VS.NET)



Answer

Instructions - Step by Step: Virtual Directory Setup

Set up Internet Information Server


1. Create a VOB and snapshot view to use with your ASP.NET (Framework 1.x) project.

Note: Rational does not support serving ASP applications or webs in a dynamic view. Change request (RFE) RATLC00608173 has been submited to add support for this functionality.

Production deployment needs to be done through a snapshot view. Review Microsoft Knowledge Base Article 320268 for more details on the errors related to using a dynamic view to host ASP pages. Developing an ASP.NET project however, can be performed from a dynamic view.

If the KB article has been applied successfully, attempts to use a Dynamic view with .NET IIS the following must be done:

  • Do NOT used the Mapped Drive:
    M:\viewname\........

    Use a UNC path to the MVFS drive:
    \\view\<viewname>\......

    Where \\view is the literal name and <viewname> is the name of your view.
  • The option A share located on another computer on the IIS admin console "Virtual Directory" tab, enter the user's account credentials (when you press the "connect as" button) and set the anonymous access account (on the "Directory Security" tab) to the same account.

2. Copy the ASP.NET (Framework 1.x) Project(s) into the snapshot view.

Example:

C:\snapshot_view\vob\ASP_Project\



3. Open Internet Information Services (IIS) and create a Virtual Directory.

The
Example:

Start > Settings > Control Panel > Administrative Tools > Internet Information Services


Note: The "Default Web Site" is used as an example in the step above, you will need to follow this procedure on the Web Site you wish to modify and add to Rational ClearCase source control.

4. Create a name for the Virtual Directory (App2 will be used for this example).

5. Provide a path for the virtual directory using the ASP.NET (Framework 1.x) Project in the snapshot view.

Example:

C:\snapshot_view\vob\ASP_Project\App2\

6. Set the Access Permissions as required.

Note: There are no ClearCase specific permissions required.

7. Close all windows to finish. You will see the included sub folders now appear in the IIS containing all files.

8. Repeat for each Project as needed.


Add the ASP.NET Project to ClearCase Source Control


1. Copy the existing Solution folder into the ClearCase view within the VOB.

Note: Be sure to leave the copied Solution folder with the same name.


2. Within the copied Solution folder, open the solution (*.sln) file and remove the entire section labeled:

"GlobalSection(SourceCodeControl) = preSolution" through "EndGlobalSection" inclusive.

Note: If using virtual directories, change project URL to point to the Virtual Directory created above, should be 2nd line in file.


3. Delete *.scc from every folder and sub-folder of the Solution.


4. Delete *.vspscc from every folder and sub-folder of the Solution.


5. From Visual Studio.NET open the copied .sln file.

Note: Click OK to all pop-up windows.


6. In the Solution Explorer, right click on the Solution and Remove any web projects which could not be located.


7. In each web project sub-folder, create a .webinfo file if one does not exist.

Note: The .webinfo file should be named <project_name>.csproj.webinfo and it must be a text file pointing to the <project_name>.csproj file. You may need to copy an existing webinfo file from another web project (which was created from scratch) and modify it, or create a new one.

The following is an example of what the .webinfo file must contain:

<VisualStudioUNCWeb>
<Web URLPath = "
http://localhost/xpweb/xpweb/xpweb.csproj" />
</VisualStudioUNCWeb>



8. In the Solution Explorer, right-click the Solution and click Add > Add Existing Project From Web.


9. Give the URL to the <project_name>.csproj file, or when prompted, browse to the <project_name>.csproj file and select it.

Note: This step will fail if the webinfo file from step 8 is not created.


10. In the Solution Explorer, right-click the Solution and click Add Solution to Source Control...


11. In the Solution Explorer, right-click each web project click Add Existing Item...


12. Select the .webinfo file which is inside the project's folder and Checkout when prompted to do so.

You have now completed the steps for adding an existing ASP.NET (Framework 1.x) project to ClearCase for one view. If you wish to work on the ASP.NET (Framework 1.x) project through other views, you must follow the following procedure for those views.



DISCLAIMER

If you have already attempted to manually add your ASP.NET (Framework 1.x) Solution or Project to ClearCase source control in any way that does not follow the above procedure, then you must remove (cleartool rmelem) everything from ClearCase and start over using the above procedure.

Every project and solution has a different combination of files and directories that must be left outside source control as view private.

Given the large, and growing, number of ASP.NET project types, Rational Technical Support cannot account for every file and directory that must be left out of source control. Therefore, any attempt to manually add an existing ASP.NET project to ClearCase source control that does not follow the above procedure will not be supported.



Troubleshooting Tips:

If you are experiencing permission issues or other unexpected results please consider the information below.

ASP.NET maintains its own cache information.

To clean up the cache go to C:\winnt\Microsoft.NET\Framework\<version number> and delete the Temporary ASP.NET Files folder.


Then cd into C:\winnt\Microsoft.NET\Framework\<version number> and run aspnet_regiis.exe -r

Note: aspnet_regiis.exe will rebuild mappings between IIS and ASP.NET.


If you receive an error Access is denied while trying to clean up the cache information do the following first.

  1. Stop IIS Services
  2. Go to Task Manager and End Process aspnet_up.exe
  3. End Process any other web service that is running ASP applications such as xpweb_debug or xpweb_application name.


DEBUGGING ASP.NET

In order to debug ASP.NET webs and applications, the user must be local administrator on the machine running IIS, as well as, a member of the local VS Developers group. This group is created during the installation of Visual Studio.NET.

Security Exception Error

Note: If you encounter the following error using virtual directories:



Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Security error.

Source Error:

Line 30: private static bool __intialized = false; Line 31: Line 32: public Global_asax() { Line 33: if ((ASP.Global_asax.__intialized == false)) { Line 34: ASP.Global_asax.__intialized = true;



Review Microsoft Knowledge Base Article 320268 for more details.


[{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Integrations: Visual Studio.NET","Platform":[{"code":"PF033","label":"Windows"}],"Version":"2002.05.00;2003.06.00;7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Integrations: Visual Studio.NET","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21129589