在Asp.net中将项目更改为网站时发生的问题

时间:2023-01-17 09:26:52

After changing a Project to Website, i got an error while running the application.The error is as follows:-

将项目更改为网站后,运行应用程序时出错。错误如下: -

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 ISS.

在应用程序级别之外使用注册为allowDefinition ='MachineToApplication'的部分是错误的。此错误可能是由于未在ISS中将虚拟目录配置为应用程序引起的。

How can i solve this problem?ISS is installed in my system.Then what could be the reason for this?

我怎样才能解决这个问题?我的系统中安装了ISS。那么可能是什么原因造成的?

Please help...

2 个解决方案

#1


Sounds like your virtual directory isn't set to run as an application.

听起来您的虚拟目录未设置为作为应用程序运行。

Go into IIS, find the virtual directory that contains your project, go into properties for that folder and in the virtual directory tab you'll see 'Application Settings' near the bottom. Click the 'Create' button down here to set the website up as an application.

进入IIS,找到包含项目的虚拟目录,进入该文件夹的属性,在虚拟目录选项卡中,您将看到底部附近的“应用程序设置”。单击此处的“创建”按钮将网站设置为应用程序。

#2


In the IIS Manager snap-in, go to your web site property page, then select create application.

在IIS管理器管理单元中,转到您的网站属性页,然后选择创建应用程序。

#1


Sounds like your virtual directory isn't set to run as an application.

听起来您的虚拟目录未设置为作为应用程序运行。

Go into IIS, find the virtual directory that contains your project, go into properties for that folder and in the virtual directory tab you'll see 'Application Settings' near the bottom. Click the 'Create' button down here to set the website up as an application.

进入IIS,找到包含项目的虚拟目录,进入该文件夹的属性,在虚拟目录选项卡中,您将看到底部附近的“应用程序设置”。单击此处的“创建”按钮将网站设置为应用程序。

#2


In the IIS Manager snap-in, go to your web site property page, then select create application.

在IIS管理器管理单元中,转到您的网站属性页,然后选择创建应用程序。