简体   繁体   English

在IIS中配置ASP.NET应用程序

[英]Configuring an ASP.NET application in IIS

I've inherited some aspx (including the web.config file) and am getting the following error. 我继承了一些aspx(包括web.config文件),并收到以下错误。 I've created a virtual directory for it but I'm not sure how would I "configure it as an 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 49:             ASP.NET to identify an incoming user. 
Line 50:         -->
Line 51:        <authentication mode="Windows"/>
Line 52: 
Line 53:     <customErrors mode="Off"/>


Source File: C:\<MYPATH>\web.config    Line: 51 

Go into the properties of the virtual directory, click the 'Virtual Directory' tab and click 'Create' button under 'Application Settings', then set 'Execute permissions' to 'Scripts only' 进入虚拟目录的属性,单击“虚拟目录”选项卡,然后单击“应用程序设置”下的“创建”按钮,然后将“执行权限”设置为“仅脚本”

Also check the ASP.NET tab to make sure it is set to the correct version for your app. 还要检查ASP.NET选项卡,确保将其设置为适合您应用的版本。

Lastly, make sure the application pool being used for the virtual directory is only used by other sites and virtual directories using the same version of ASP.NET. 最后,确保用于虚拟目录的应用程序池仅由使用相同版本的ASP.NET的其他站点和虚拟目录使用。

右键单击您的虚拟目录 - 属性 - 选项卡“虚拟目录”单击中间的“创建”按钮并为您的应用程序命名

In IIS6 MMC, right click on the folder the application is deployed to, click Properties then click the Create button. 在IIS6 MMC中,右键单击部署应用程序的文件夹,单击“属性”,然后单击“创建”按钮。

That will create an IIS Application. 这将创建一个IIS应用程序。

Oh and make sure you choose the correct version of ASP.NET from the ASP.NET tab and make sure it resides in the correct application pool for the version of ASP.NET selected. 哦,确保从ASP.NET选项卡中选择正确的ASP.NET版本,并确保它位于所选ASP.NET版本的正确应用程序池中。

Bring up the properties for the vdir. 打开vdir的属性。 Verify that it is an application, on the Virtual Directory tab look at Application Settings, click Create if it is not an application. 验证它是否为应用程序,在“虚拟目录”选项卡上查看“应用程序设置”,如果它不是应用程序,则单击“创建”。

The vDir Icon is also different if the folder is an application, applications are little open boxes, non-application vdirs show a folder icon with a small globe. 如果文件夹是应用程序,应用程序是小打开框,非应用程序vdirs显示带有小地球仪的文件夹图标,则vDir图标也不同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM