在一个站点中同时拥有HTML和ASPX网页

时间:2009-05-13 05:54:54

标签: asp.net html iis-6

我在IIS6上运行的现有网站只有静态HTML页面。我有一个页面,有人可以通过电子邮件发送他们的信息,但希望使用ASP.NET编写此页面。

我之前从未混合过HTML和ASP.NET,并且想过如果我从ASP.NET发布了我需要的页面并将其放在现有网站的根目录中,这将是我所需要的,但我收到的是页面尝试提交到ASP.NET页面时出错。

我收到错误以下错误:

感谢您的帮助!

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

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 

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

2 个答案:

答案 0 :(得分:1)

如果您在IIS中的虚拟目录中运行ASP.NET,则需要将其配置为应用程序。要做到这一点:

  1. 打开IIS管理器(如果“开始”菜单中有“管理工具”,则可以从那里访问IIS)。
  2. 在左侧的树中,找到您的虚拟目录
  3. 右键单击目录,然后选择“属性”
  4. 找到“应用程序名称”字段。
  5. 如果文本框旁边有“创建”按钮,请单击它。如果它是“删除”按钮,那么您应该评论这个答案是错误的。
  6. 祝你好运!

答案 1 :(得分:0)

如果您在Google上收到错误消息,则会获得大量点击,以解决您的问题。

例如herehere