简体   繁体   中英

Configuring an ASP.NET application in IIS

I've inherited some aspx (including the web.config file) and am getting the following error. 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.

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.

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

In IIS6 MMC, right click on the folder the application is deployed to, click Properties then click the Create button.

That will create an IIS Application.

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.

Bring up the properties for the 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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