asp.nethtmliis-6

Have both HTML and ASPX web page in one site


I have an existing website running on IIS6 that has only static HTML pages. I have one page where someone can email their information, but would like to code this page using ASP.NET.

I've never mixed both HTML and ASP.NET before and thought if I published the page I needed from ASP.NET and put it in the root of the existing website that would be all I needed, but I am receiving an error when the page tries to submit to the ASP.NET page.

I get the error the following error:

Thanks for your help!

============================================================

Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:

Line 44:             ASP.NET to identify an incoming user. 
Line 45:         -->
Line 46:         <authentication mode="Windows"  />
Line 47:         <!--
Line 48:             The <customErrors> section enables configuration 

============================================================


Solution

  • If you're running an ASP.NET in a Virtual Directory in IIS, you need to configure it as an application. To do this:

    1. Open up IIS Manager (if you have Administrative Tools in your Start menu, you can get to IIS from there).
    2. In the tree on the left, find your Virtual Directory
    3. Right click the directory, and select Properties
    4. Find the "Application Name" field.
    5. If there's a "Create" button beside the text box, click it. If it's a "Remove" button, then you should comment that this answer is wrong.

    Good luck!