Microsoft KB Archive/827074

= BUG: &quot;ASP.NET Version Mismatch&quot; error message when you open an ASP.NET 1.0 project in Visual Studio .NET 2003 =

Article ID: 827074

Article Last Modified on 7/21/2006

-

APPLIES TO


 * Microsoft Visual Studio .NET 2003 Enterprise Architect
 * Microsoft Visual Studio .NET 2003 Enterprise Developer
 * Microsoft Visual Studio .NET 2003 Academic Edition
 * Microsoft ASP.NET 1.1

-



SYMPTOMS
When you use Microsoft Visual Studio .NET 2003 to open a Microsoft ASP.NET 1.0 project on a Web server that is running ASP.NET version 1.1, you may receive the following &quot;ASP.NET Version Mismatch&quot; error message:

Visual Studio .NET has detected that the Web server is running ASP.NET version 1.0. The Web application you are creating or opening can be configured to be compliant with ASP.NET 1.0.

However, the application will not be able to use new features from ASP.NET 1.1.



CAUSE
This problem occurs because the virtual root of the Web server that is hosting the Web application is configured to use ASP.NET 1.0.



WORKAROUND
To work around this problem, create a Get_aspx_ver.aspx file in the Web application folder that contains the Web.config file. To create the Get_aspx_ver.aspx file for the Web application that you create in the &quot;More Information&quot; section of this article, follow these steps:  Locate the MyWebApp2002 project folder (located in \wwwroot). In the MyWebApp2002 folder, create a new text file, and then rename the file get_aspx_ver.aspx .  Add the following line of code to the Web.config file:   In the Rename dialog box, click Yes. Perform steps 4, 5 and 6 in the &quot;More Information&quot; section of this article.

Note If you receive a Microsoft Development Environment dialog box, click OK.

<div class="status_section">

STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the &quot;Applies to&quot; section.

<div class="moreinformation_section">

Steps to reproduce the behavior
 Create a new ASP.NET 1.0 Web application. To do this, follow these steps:  Start Microsoft Visual Studio .NET.</li> On the File menu, point to New, and then click Project.</li> Under Project Types, click Visual C# Projects or Visual Basic Projects, and then click ASP.NET Web Application under Templates.</li> In the Location text box, type http://localhost/MyWebApp2002 .</li> In the New Project dialog box, click OK. By default, WebForm1 is created.</li> Add a Label control to WebForm1.</li> Right-click Label1, and then click Properties.</li> In the Properties dialog box, type This is an ASP.NET 1.0 application for the Text property.</li> On the Build menu, click Build Solution.</li></ol> </li> To locate the ASP.NET version that is used for the MyWebApp2002 Web application, follow these steps:  Click Start, and then click Run.</li> In the Open text box, type inetmgr. Click OK.</li> <li>In the Internet Information Services (IIS) Manager window, expand  (local computer).</li> <li>Expand Web Sites, and then expand Default Web Site.</li> <li>Locate the MyWebApp2002 folder. Right-click the folder, and then click Properties.</li> <li>In the Properties dialog box, click the Directory tab.</li> <li>On the Directory tab, click Configuration. In the Application Configuration dialog box, click the .aspx file name extension in the Extension column.</li> <li>The Executable Path column of the dialog box lists the path of the ASP.NET ISAPI version that the Web application uses. By default, the ASP.NET ISAPI is installed in \Microsoft.NET\Framework\ \Aspnet_isapi.dll. The version number in the path indicates the version number of the ASP.NET ISAPI that the application uses. When the application is using ASP.NET 1.0, the Executable Path column appears as follows:

 \Microsoft.NET\Framework\v1.0.3705\aspnet_isapi.dll

</li> <li>In the Application Configuration dialog box, click OK.</li> <li>In the MyWebApp2002 Properties dialog box, click OK.</li> <li>Perform step 3 only when the MyWebApp2002 application is not configured for ASP.NET 1.0.</li></ol> </li> <li>To configure the MyWebApp2002 Web application to ASP.NET 1.0, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>Click Start, and then click Run.</li> <li>In the Open text box, type cmd. Click OK .</li> <li>At the command prompt, type cd %windir%, and then type cd Microsoft.NET\Framework\v1.0.3705 .</li> <li>At the command prompt, type the following command to configure the ASP.NET 1.0 application in Microsoft Internet Information Services (IIS): aspnet_regiis -s w3svc/1/root/ MyWebApp2002 </li></ol> </li> <li>Start Microsoft Visual Studio .NET 2003.</li> <li>On the File menu, point to Open, and then click Project.</li> <li>In the Open Project dialog box, locate the MyWebApp2002.sln file (located in My Documents\Visual Studio Projects\MyWebApp2002). Click the MyWebApp2002.sln file, and then click Open.</li></ol>

<div class="references_section">