Microsoft KB Archive/825792

= PRB: &quot;Not Running ASP.NET Version 1.1&quot; Error Message When You Try to Open an ASP.NET Web Application Project in Visual Studio .NET 2003 =

Article ID: 825792

Article Last Modified on 11/14/2003

-

APPLIES TO


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

-





SYMPTOMS
In the customErrors section of the Web.config file that exists in the root directory of the Default Web Site Web site that is set in Microsoft Internet Information Services (IIS), when you set the defaultRedirect attribute to an HTML file or to an Active Server Page (ASP) file and the Mode attribute to On, and then you try to open a new Microsoft ASP.NET Web Application project by using Microsoft Visual Studio .NET 2003, you receive the following error message:

Visual Studio .NET has detected that the specified Web server is not running ASP.NET version 1.1. You will be unable to run ASP.NET Web applications or services.

Note You receive a similar error message when you try to use the Copy Project menu option to open a copy of an existing ASP.NET Web Application project.



CAUSE
When you try to open an ASP.NET Web Application project, the ASP.NET process accesses a nonexistent file that is named Get_aspx_ver.aspx to retrieve the ASP.NET version information. If the defaultRedirect attribute is not set to an HTML file or to an ASP file, the request for the Get_aspx_ver.aspx file returns the HTTP 404 error and the ASP.NET version information. If the defaultRedirect attribute is set to an HTML file or to an ASP file, the request for the Get_aspx_ver.aspx file does not return the ASP.NET version information. Therefore, you receive the error that is mentioned in the &quot;Symptoms&quot; section of this article.



WORKAROUND
To work around this problem, follow these steps:  Create a new text file in Notepad.  Add the following HTML code to the text file: The resource cannot be found. body {font-family:&quot;Verdana&quot;;font-weight:normal;font-size: .7em;color:black;} p {font-family:&quot;Verdana&quot;;font-weight:normal;color:black;margin-top: -5px} b {font-family:&quot;Verdana&quot;;font-weight:bold;color:black;margin-top: -5px} H1 { font-family:&quot;Verdana&quot;;font-weight:normal;font-size:18pt;color:red } H2 { font-family:&quot;Verdana&quot;;font-weight:normal;font-size:14pt;color:maroon } pre {font-family:&quot;Lucida Console&quot;;font-size: .9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }



Server Error in '/' Application.

The resource cannot be found.



 Description: HTTP 404. The resource you are looking for (or one of its            dependencies) may have been removed, had its name changed, or is temporarily unavailable. Review the following URL and make sure that it is spelled correctly.

 Requested Url: /appError.aspx

 Save the text file as Get_aspx_ver.aspx in the physical folder that is mapped to the Default Web Site Web site that is set in IIS.</ol>

<div class="status_section">

STATUS
This behavior is by design.

<div class="moreinformation_section">

Steps to Reproduce the Behavior
<ol> Open the Web.config file (if this file exists) from the physical folder that is mapped to the Default Web Site Web site in IIS.

Note If the Web.config file does not exist, follow these steps: <ol style="list-style-type: lower-alpha;"> Create a text file in Notepad.</li>  Add the following XML code to the text file: <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?> <system.web>

<compilation defaultLanguage=&quot;c#&quot; debug=&quot;true&quot; />

<customErrors mode=&quot;RemoteOnly&quot; />

<authentication mode=&quot;Windows&quot; />

<trace enabled=&quot;false&quot; requestLimit=&quot;10&quot; pageOutput=&quot;false&quot; traceMode=&quot;SortByTime&quot; localOnly=&quot;true&quot; />

<sessionState mode=&quot;InProc&quot; stateConnectionString=&quot;tcpip=127.0.0.1:42424&quot; sqlConnectionString=&quot;data source=127.0.0.1;user id=sa;password=&quot; cookieless=&quot;false&quot; timeout=&quot;20&quot; />

<globalization requestEncoding=&quot;utf-8&quot; responseEncoding=&quot;utf-8&quot; /> </system.web>

</li> Save the text file as Web.config in the physical folder that mapped to the Default Web Site Web site in IIS.</li></ol> </li>  In the customErrors section of the Web.config file, locate the following code: <customErrors mode=&quot;RemoteOnly&quot; /> </li>  Replace the code that you located in step 2 with the following code: <customErrors mode=&quot;On&quot; defaultRedirect=&quot;appError.asp&quot; /> Note The value, appError.asp, of the defaultRedirect attribute points to an ASP file that exists in the Default Web Site Web site in IIS. </li> Create a text file in Notepad.</li>  Add the following ASP code to the text file: <%@ Language=VBScript %> Test Error Page </li> Save the text file as appError.asp in the physical folder that is mapped to the Default Web Site Web site in IIS.</li> Try to open a new ASP.NET Web Application project by using Visual Studio .NET 2003. You notice the error that is mentioned in the &quot;Symptoms&quot; section of this article.</li></ol>

<div class="references_section">