在IIS 7.0中发布网站

时间:2011-07-27 11:29:13

标签: asp.net iis-7

我想在Windows 7机器上发布基于ASP.net的网页。但是,我在下面的代码中不断出现错误。

<sessionState mode="Inproc" timeout="30"></sessionState>

错误讯息:

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:

<sessionState mode="Inproc" timeout="30"></sessionState>

如何摆脱这个问题?

1 个答案:

答案 0 :(得分:2)

线索在于错误消息:

This error can be caused by a virtual directory not being configured as an application in IIS.

您是否在IIS中为其创建了“应用程序”? IIS中的网站节点是文件夹还是地球仪?