Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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.

↑ Back to the top


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 "Symptoms" section of this article.

↑ Back to the top


Workaround

To work around this problem, follow these steps:
  1. Create a new text file in Notepad.
  2. Add the following HTML code to the text file:
    <html>
        <head>
            <title>The resource cannot be found.</title>
            <style>
            	body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 
            	p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
            	b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
            	H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
            	H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
            	pre {font-family:"Lucida Console";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; }
            </style>
        </head>
    
        <body bgcolor="white">
    
                <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>
    
                <h2> <i>The resource cannot be found.</i> </h2></span>
    
                <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">
    
                <b> Description: </b>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.
                <br><br>
    
                <b> Requested Url: </b>/appError.aspx<br><br>
    
        </body>
    </html>
    
  3. 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.

↑ Back to the top


Status

This behavior is by design.

↑ Back to the top


More information

Steps to Reproduce the Behavior

  1. 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:
    1. Create a text file in Notepad.
    2. Add the following XML code to the text file:
      <?xml version="1.0" encoding="utf-8" ?>
      <configuration>
          
        <system.web>
      
          <compilation 
               defaultLanguage="c#"
               debug="true"
          />
      
          <customErrors 
          mode="RemoteOnly"
          /> 
      
          <authentication mode="Windows" /> 
      
          <trace
              enabled="false"
              requestLimit="10"
              pageOutput="false"
              traceMode="SortByTime"
      		localOnly="true"
          />
      
          <sessionState 
                  mode="InProc"
                  stateConnectionString="tcpip=127.0.0.1:42424"
                  sqlConnectionString="data source=127.0.0.1;user id=sa;password="
                  cookieless="false" 
                  timeout="20" 
          />
      
          <globalization 
                  requestEncoding="utf-8" 
                  responseEncoding="utf-8" 
         />
         
       </system.web>
      
      </configuration>
      
    3. Save the text file as Web.config in the physical folder that mapped to the Default Web Site Web site in IIS.
  2. In the customErrors section of the Web.config file, locate the following code:
    <customErrors mode="RemoteOnly" />
  3. Replace the code that you located in step 2 with the following code:
    <customErrors mode="On" defaultRedirect="appError.asp" />
    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.
  4. Create a text file in Notepad.
  5. Add the following ASP code to the text file:
    <%@ Language=VBScript %>
    <html>
    <head>
    </head>
    <body>
    Test Error Page
    </body>
    </html>
    
  6. Save the text file as appError.asp in the physical folder that is mapped to the Default Web Site Web site in IIS.
  7. 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 "Symptoms" section of this article.

↑ Back to the top


References

For additional information about the customErrors section in the Web.config file, click the following article number to view the article in the Microsoft Knowledge Base:
306355 HOW TO: Create Custom Error Reporting Pages in ASP.NET by Using Visual C# .NET

↑ Back to the top


Keywords: KB825792, kbprb, kbideproject, kbdeployment, kbmsg

↑ Back to the top

Article Info
Article ID : 825792
Revision : 5
Created on : 11/14/2003
Published on : 11/14/2003
Exists online : False
Views : 543