问题描述:

I have created an asp.net C# application developed in visual studio 2010, which is running without any error on my PC, but when i tried to run the same application on another computer with visual studio 2010, it gives following error,

The element 'buildProviders' cannot be defined below the application level.

网友答案:

Following article at http://forums.iis.net/t/1160248.aspx?The+element+buildProviders+cannot+be+defined+below+the+application+level+

You probably need to convert the virtual directory to application. I encountered this when deploying my app (using NancyFX).

You can open IIS Manager->Right-click the diretory of your web application->Click Convert to Application.

网友答案:

If you recently upgraded your solution, check for the backup directory for crystal report within your solution. The backup directory can get created when you upgrade visual studio. To resolve this error, closed the solution. Went to the solution directory and delete or move the backup directory to a different location outside of the solution directory. This solved the problem for me

网友答案:

I faced this problem and i found out that somehow i had another version of my website within the subfolders of my webstie.

Meaning that my website is in a folder called "FrontEnd". Withing this folder there is a subforlder called backup that contains a backup of my website.

when i removed the backup folder, everything went ok.

网友答案:

You can fix this problem either defining the element in the web.config file of the root dir or setting Virtual Directory as APPLICATION in IIS. For doing this with IIS 6.0, you first have to set the the directory in which your site is present as a Virtual Directory and then define this virtual directory as an Application.

All physical directories under Inetpub\Wwwroot are not considered applications until the following procedure is used:

  1. Open IIS Manager.
  2. Expand the Default Web Site node and look for the subdirectory that you want to designate as an application root.
  3. Right-click the directory that you want to mark as an application root, and then click Properties.
  4. On the Directory tab, in the Application Settings section, click Create.
  5. In the Application name text box, type the name of the application, and then click OK.
  6. The virtual directory is now an application root.
网友答案:

(In my case name of project was repeating in directory ) The problem's solution is very simple: check its root directory in Solution Explorer. If there is a name folder within another name folder then this error will occur. Your web site contents should be very first after your web site name folder. In other words, contents should not display in another same name folder.

相关阅读:
Top